This has worked for me with Windows– I haven't tested in on OSX yet. On Windows, the final thing worth considering if none of this is working is zadig libusbK conversion of existing drivers. Now If you plug it in to your computer from the USB_USER port, it should appear as a DFU device on your system and be accessible under the USB tab within CubeProgrammer. It's also possible to get Windows DFU drivers from STM directly. We need to make sure we have the proper DFU drivers installed on OSX, brew install dfu-util should do it on Windows, the DFU drivers should be installed in C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\Drivers\DFU_Driver, where you can click on STM32Bootloader.bat. We have to set up the jumpers on board to enable DFU mode by moving JP1 to USB_MCU and connecting pins 5 and 7 on CN7 ( as shown here). If the above is giving you any trouble, we can also program the board in DFU mode. Make sure it's in Normal/Software Reset mode– you may need to hold down the Reset button on the board, hit Connect in the software, and immediately release the Reset button to get it to work. Given the same setup in STM32CubeProgrammer as above, you should be able to connect to the board simply by clicking the big green 'Connect' button. On the Nucleo board, you should be able to flash the firmware using the ST-Link. We can see from this table that for the Nucleo, which is designed around the STM32WB55RG, the FUS firmware belongs at location 0x080EC000 and the stm32wb5x_BLE_Stack_full_fw should be flashed to 0x080CB000. You'll also find Release Notes.html in that folder, which gives us the memory addresses we need to use for each binary in a table towards the bottom called Firmware Upgrade Services Binary Table for our first step and Wireless Coprocessor Binary Table for our second step. STM32CubeWB/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x Within it we find the binaries for the wireless co-process in: This is a two step process– we need to upgrade the underlying firmware on the coprocessor first and then flash the wireless stack we want to use (BLE in this case).įirst, we should download the firmware pack from github. Flashing the Wireless Co-processor Firmware You'll have to click 'Open in Update Mode' and the 'Upgrade' to actually update the programmer. Upgrade your ST-Link using the blue 'Firmware Upgrade' button on the bottom right, which pops up this dialog box. Let's click Firmware Upgrade (again on the right) to update the included programmer on the Nucleo Board. If we open the STM32 CubeProgrammer, we should see a Serial number if we refresh the right sidebar with 'ST-LINK' selected at the very top. When you connect the STM32, you should see some flashing LEDs and a new device should appear in your Finder/File Explorer window. The programmer chip firmware should be updated first. Of course, the Nucleo board has 2 STM32s on it– the main WB chip we'll be talking about the rest of the time, and a secondary STM32 chip that serves as an ST-LINK device for programming the WB. The easiest first step is to connect your USB to the STM32 Nucleo board ST_LINK port (closer to the side/header). It also works over the ST-Link, SWD, and DFU interfaces, so it's a great one-stop-shop for interfacing with the STM32. The Cube Programmer interface is a new tool, and it's actually incredibly useful for checking/setting fuses, downloading firmware and programs, and reading/writing memory. click on this if clicking on the Application File doesn't work. You'll also need the ST-Link driver, installed with homebrew: brew install stlink. You also may actually have to show the Package Contents and click on the setup executable manually. This can be installed with brew on Mac OSX: #if you don't have brew, get it with this command To set up CubeProgrammer, you may have to download the Java JDK (one with JavaFX, aka version 8– if you've installed a more recent one you can simply delete the folder from /Library/Java/JavaVirtualmachines). Step 1 is to download STM32CubeIDE and STM32CubeProgrammer – I had previously had a lot of issues running this natively on Mac, but it seems like version 1.3.0 works great natively (Windows support has always been good). This section falls into four parts: (1) set up the toolchain so you can talk to to the nucleo board, (2) flash the Bluetooth firmware, (3) ensure we can run a BLE pre-compiled example, and (4) import an STM32 example into CubeMX and run a BLE example. STM32WBCubeIDE and STM32CubeProgrammer are the required/useful software from STM's website. Let's jump right in! Running an Example on the STM32WB Nucleo Board To build the app, I'm using React-Native, the javascript based development environment that can cross-compile. My goal is to get an example running with FreeRTOS and threads that manages a general BLE throughput to an app in the background.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |