btstack/port/stm32-f4discovery-usb
Matthias Ringwald 1fd701e0cd ports: add a2dp
2022-03-16 22:20:09 +01:00
..
bsp stm32-f4discovery-usb: enable audio support 2021-02-11 17:09:31 +01:00
Core stm32-f4discovery-usb: enable audio support 2021-02-11 17:09:31 +01:00
Drivers stm32-f4discovery-usb: don't re-activate the channel for BULK endpoints 2021-02-11 17:09:31 +01:00
Middlewares/ST/STM32_USB_Host_Library stm32-f4discovery-usb: enable RTT, USBH debug messages, HID test, 4 Endpoints 2021-02-11 17:09:30 +01:00
pdm stm32-f4discovery-usb: enable audio support 2021-02-11 17:09:31 +01:00
port ports: add link to documentation in btstack_config.h 2021-12-09 16:42:48 +01:00
USB_HOST stm32-f4discovery-usb: create usbh_bluetooth.c 2021-02-11 17:09:30 +01:00
.mxproject stm32-f4discovery-usb: enable RTT, USBH debug messages, HID test, 4 Endpoints 2021-02-11 17:09:30 +01:00
Makefile ports: add a2dp 2022-03-16 22:20:09 +01:00
ozone.jdebug stm32-f4discovery-usb: add BTstack sources, build examples, add stub h2 driver 2021-02-11 17:09:31 +01:00
README.md port: copy edit port readmes, archive ios port 2021-05-31 16:44:53 +02:00
startup_stm32f407xx.s stm32-f4discovery-usb: enable RTT, USBH debug messages, HID test, 4 Endpoints 2021-02-11 17:09:30 +01:00
stm32-f4discovery-usb-blog.ioc stm32-f4discovery-usb: enable RTT, USBH debug messages, HID test, 4 Endpoints 2021-02-11 17:09:30 +01:00
STM32F407VGTx_FLASH.ld stm32-f4discovery-usb: enable RTT, USBH debug messages, HID test, 4 Endpoints 2021-02-11 17:09:30 +01:00

BTstack Port for STM32 F4 Discovery Board with USB Bluetooth Controller

This port uses the STM32 F4 Discovery Board with an USB Bluetooth Controller plugged into its USB UTG port. See blog post for details.

STCubeMX was used to provide the HAL, initialize the device, and the Makefile. For easy development, Ozone project files are generated as well.

Hardware

STM32 Development kit with USB OTG adapter and USB CSR8510 Bluetooth Controller

Software

To build all examples, run make

$ make

All examples and the .jedbug Ozone project files are placed in the 'build' folder.

Flash And Run The Examples

The Makefile builds different versions:

  • example.elf: .elf file with all debug information
  • example.bin: .bin file that can be used for flashing

There are different options to flash and debug the F4 Discovery board. The F4 Discovery boards comes with an on-board ST-Link programmer and debugger. As an alternative, the ST-Link programmer can be replaced by an SEGGER J-Link OB. Finally, the STM32 can be programmed with any ARM Cortex JTAG or SWD programmer via the SWD jumper.

Run Example Project using Ozone

When using an external J-Link programmer or after installing J-Link OB on the F4 Discovery board, you can flash and debug using the cross-platform SEGGER Ozone Debugger. It is included in some J-Link programmers or can be used for free for evaluation usage.

Just start Ozone and open the .jdebug file in the build folder. When compiled with "ENABLE_SEGGER_RTT", the debug output shows up in the Terminal window of Ozone.

Debug output

The debug output can send via SEGGER RTT.

In src/btstack_config.h resp. in example/btstack_config.h of the generated projects, additional debug information can be enabled by uncommenting ENABLE_LOG_INFO.

Also, the full packet log can be enabled in src/port.c resp. btstack/port/stm32-f4discovery-cc256x/src/port.c by uncommenting the hci_dump_init(..) line. The console output can then be converted into .pklg files for OS X PacketLogger or WireShark by running tool/create_packet_log.py

GATT Database

In BTstack, the GATT Database is defined via the .gatt file in the example folder. The Makefile contains rules to update the .h file when the .gatt was modified.

Maintainer Notes - Updating The Port

The Audio BSP is from the STM32F4Cube V1.16 firmware and not generated from STM32CubeMX. To update the HAL, run 'generate code' in CubeMX. After that, make sure to re-apply the patches to the UART and check if the hal config was changed.