STM32 Bluetooth Firmware Tutorial (Bring-Up) - Phil's Lab #129

preview_player
Показать описание

[SUPPORT]

[GIT]

[SOCIAL]

[LINKS]
KiCad 7 Hardware Design Videos:

[TIMESTAMPS]
00:00 Introduction
00:39 Hardware Design Tutorials

01:07 PCBWay
01:28 Altium Designer Free Trial

02:11 Schematic Walkthrough
04:03 Software Tools and Debugger
06:20 STM32CubeProgrammer & USB DFU
09:27 FUS & BLE Stack
14:01 CubeIDE Project, SWD & HSE/LSE Set-Up
17:02 USB Set-Up
18:10 RF/BLE Set-Up
25:00 Clocking
25:45 Flashing Firmware & USB Fix
27:59 Bluetooth Test
29:44 Bluetooth & USB Test

33:02 Outro
Рекомендации по теме
Комментарии
Автор

Philip you're a life changer, I appreciate every video you put online

USEmbassy-xi
Автор

Is it possible to build a communication between two STM32WB55 just like (or at least as fast as and as reliable as) the ESP now by espressif but with lower power consumption? The scenario i'm looking for is one STM32WB55 as a sender (controller) and an other STM32WB55 as a receiver (like a drone or robot).

FlyHIGHSIM
Автор

can you switch USB with USART to print out characters via terminal if you use nucleo and onboard stlink?

persupersulast
Автор

*Summary*

*Introduction to STM32 WB Custom Hardware Design*
- 0:00 Introduction to the video's topic: board bring-up steps for STM32 WB based custom hardware.
- 0:07 Overview of the STM32 WB 55 microcontroller and its features including chip antenna, user switch, and USB-C connector.
- 0:21 Explanation of the tag connect header for programming.
- 0:32 Mention of quirks in firmware setup to be addressed in the video.

*Hardware Design and Supporting Tools*
- 0:43 Reference to a detailed hardware design tutorial available in two videos.
- 1:08 Acknowledgment of PCBWay for manufacturing the STM32 WB custom hardware.
- 1:32 Use of Altium Designer for the board design and a promotion for a free trial.

*Schematic Overview and Components*
- 2:15 Introduction to the schematic of the STM32 WB 55 board.
- 2:20 Details of the USB type-C connector and power configuration.
- 2:49 Description of the programming interfaces and boot zero functionality.
- 3:01 Explanation of the boot zero switch's role in firmware startup.
- 3:21 Description of the 32 MHz Crystal oscillator and the absence of a low-speed external crystal.
- 3:37 Overview of the integrated switch power supply and the RF front end with a chip antenna.

*Microcontroller and Software Tools*
- 4:03 Introduction to the STM32 WB 55C microcontroller, its features, and dual-core architecture.
- 4:23 Suggestion to download STM32CubeIDE for development.
- 4:47 Introduction to STM32CubeProgrammer for flashing firmware.

*Debugging and Programming Hardware*
- 5:01 Recommendation to use an ST debugger, specifically the STLink V3.
- 5:24 Explanation of the tag connect header and its connection to the STLink V3.

*STM32CubeProgrammer and USB DFU*
- 6:26 Demonstration of using STM32CubeProgrammer to check device connectivity.
- 7:00 Description of the boot zero functionality for USB DFU mode.
- 7:47 Adjustment of option bytes to enable boot zero pin functionality.
- 8:20 Demonstration of entering DFU mode using the boot zero switch.
- 9:03 Connecting to the microcontroller via USB in DFU mode.

*FUS & BLE Stack*
- 9:27 Explanation of the need to download co-processor binaries for the wireless stack.
- 10:02 Discussion on various available stacks and where to find them.

*Firmware Update Service (FUS) Process*
- 10:50 Explanation of the Firmware Update Service (FUS) in STM32CubeProgrammer.
- 11:06 Process of starting the FUS.
- 11:19 Checking FUS version information.
- 11:32 Note on the typically outdated FUS version in shipped STM32 WBs.
- 11:37 Steps to download and open the FUS binary file.
- 11:45 Instructions on finding the correct start address for the FUS.
- 12:02 Reference to the firmware upgrade service binary table for address determination.
- 12:15 Identification of the correct address for STM32 WB 55 CU6.
- 12:27 Steps for firmware upgrade using the STM32CubeProgrammer.
- 12:40 Verification of the updated FUS version.

*Adding the Bluetooth Low Energy (BLE) Stack*
- 12:53 Process for adding the BLE stack.
- 13:00 Steps to find and change the start address for the BLE stack.
- 13:21 Completion of the BLE stack firmware upgrade.
- 13:34 Verification of the BLE stack version.

*CubeIDE Project, SWD & HSE/LSE Set-Up*
- 14:04 Transition to setting up the main firmware in STM32CubeIDE.
- 14:17 Creation of a new STM32 project in CubeIDE.
- 14:38 Introduction to the ioc window for selecting pinouts and peripherals.
- 14:44 Basic setup for a USB and Bluetooth interface application.
- 15:09 Enabling Serial Wire Debug (SWD).
- 15:37 Explanation of enabling crystal oscillators, specifically HSE and LSE.
- 16:04 Note on the optional nature of the LSE and its implications.
- 16:29 Recommendation to include LSE in hardware design.
- 16:41 Reference to a guide for configuring STM32 WB for BLE without LSE.

*USB Set-Up for Application*
- 17:05 Steps to enable USB for the application.
- 17:23 Explanation of choosing the virtual COM port in USB middleware settings.

*RF/BLE Set-Up in CubeIDE*
- 18:13 Initial steps to enable Bluetooth functionality in the project.
- 18:31 Suggestion to read additional resources on Bluetooth technology.
- 19:17 Process of enabling various system components to access BLE middleware.
- 19:48 Activation of hardware semaphores for core synchronization.
- 20:01 Enabling IPCC for inter-core communication.
- 20:26 Activation of RTC for BLE stack access.
- 20:51 Enabling RF interface for antenna communication.
- 21:04 Selection of the relevant BLE stack in middleware settings.
- 21:15 Mention of various configurable parameters for the BLE stack.

*Setting Up Bluetooth Communication*
- 21:47 Process of sending data from phone to hardware via Bluetooth, then printing it out via USB.
- 21:52 Mention of ST's BLE Toolbox app for Android and iOS for Bluetooth interaction.
- 22:16 Configuration of BLE applications and services in STM32CubeIDE.
- 22:23 Disabling the custom P2P server and enabling the custom template.
- 22:49 Changing advertising settings to include the device's complete local name.
- 23:09 Setting up a GATT service and characteristic in STM32CubeIDE.
- 23:33 Creation of a service and characteristic for data transfer in BLE setup.
- 24:06 Configuration of service characteristics properties, setting up a write characteristic.
- 24:42 Adjusting events to trigger only on attribute write.

*Clock Configuration and Firmware Flashing*
- 25:01 Setting up the clock configuration in CubeIDE.
- 25:35 Resolving clock issues automatically using CubeIDE's feature.
- 25:46 Completion of BLE GATT, USB setup, and serial wire debug configuration.
- 26:07 Generation of necessary drivers and supporting structure after saving the IOC file.
- 26:19 Instructions for building and uploading the firmware using STM32CubeIDE.
- 26:50 Encounter with a USB device recognition issue.
- 27:02 Reference to a forum post explaining the USB recognition bug and its fix.
- 27:14 Implementation of the fix by modifying the peripheral clock config function.
- 27:38 Successful recognition of the USB serial device in the device manager.

*Testing Bluetooth and USB Functionality*
- 28:02 Confirmation of USB connectivity and Bluetooth service functionality.
- 28:14 Using the ST BLE Toolbox app to detect the Bluetooth-enabled hardware.
- 28:55 Connecting to the microcontroller via the app.
- 29:19 Identifying the custom characteristic set up for Bluetooth communication.
- 29:50 Adding functionality to the project to complete data transmission testing.
- 30:03 Modifying the STM32 WPAN folder's custom service for the test.
- 30:21 Description of the event handler function for Bluetooth characteristic changes.
- 30:40 Inclusion of the USB CDC driver in the project.
- 31:03 Adding code to transmit received Bluetooth data over USB.
- 31:39 Final compilation and firmware upload for testing.
- 31:51 Setting up a serial port connection on the host computer for data reception.

*Conducting the Bluetooth and USB Test*
- 32:03 Initiating Bluetooth connection to the hardware using the ST BLE Toolbox app.
- 32:15 Testing data transmission from the app to the microcontroller, then via USB to the host computer.
- 32:28 Successful transmission of a character ('H') from the phone to the hardware via Bluetooth, displayed in the PuTTY terminal.
- 32:34 Verification of Bluetooth and USB CDC connections and data forwarding capability.
- 32:40 Demonstration of sending various characters to showcase basic functionality.

*Firmware Customization and Extension Possibilities*
- 32:47 Discussion on extending the firmware's capabilities, such as increasing character value length.

*Conclusion and Overview of Achievements*
- 33:05 Summary of the video's achievements: basic firmware bring-up testing various peripherals of STM32 WB 55 microcontroller.
- 33:10 Review of tested features: Bluetooth, Serial Wire Debug, boot zero setting, USB-C, and chip antenna functionality.
- 33:17 Encouragement for viewers to use the demonstrated framework for developing their own designs.
- 33:28 Invitation for feedback, questions, and encouragement to subscribe for future videos on hardware, firmware, DSP, and electronics.


Disclaimer: I used chatgpt4 to summarize the video transcript. This
method may make mistakes in recognizing words.

wolpumba
Автор

First, as always thank you for such a great tutorial series.

I was wondering if you’ve tried Zephyr RTOS with STM32WB, and if so what you thought of it? Cheers !

scrubbyposh
Автор

Hey Phil, loved your video! You’ve inspired me to learn PCB design and stm32. I would like to learn more about sub-ghz using c1101. Can you make a video on that? Love you Phil ❤

hollyizza
Автор

Thanks, Phill, for another great video! 👍
And I even learn a thing or two, never too old to learn. 😁

PeetHobby
Автор

"Blue Phil" sense of humor is on point 😂😂

PattysLab
Автор

Great video, kindly do one on RF matching and PCB antenna design

stevemmaina
Автор

This is so cool!! I'm about to design my own project and bought stm32wb instead of esp32 and then you uploaded this video, i'm so happy. 😊
Btw, do you think it would be hard to update the firnware through bluetooth when i have then connected in a mesh network?

efivip
Автор

For some reason you tend to always make videos about topics I'm currently dealing with.
I'm trying to add Bluetooth Audio to my car's stereo. Since buying a new stereo is boring and the current one also doesn't have an AUX IN, I decided to make an protocol emulator for an optional CD changer. That already works with an Arduino and a cable. I tired to get it BLE audio to work with an ESP32-C3, but I had no luck. I couldn't find any documentation or examples on BLE Audio, not even in the IDF. Only A2DP, which I don't want to use because it sounds quite terrible. So I guess I'll give the STM32WBs a chance now.

DrLamalama
Автор

Great Video for Bring Up - it will be nice to focus on this more

mronesh
Автор

Can you make a video where you design a PCB and show how you calculate the capacity or resistance of a component? If you can of course! :)

egun
Автор

Nice video Phil. Surely still some quirks in the STM32WB stuff.
For all the people doing home automation out there, would be nice to see a similar video to do the same with ZigBee, and then show your bluephil in home assistant :)

zeeebrenn
Автор

hi phil great work, you are an inspiration to many engineers .would you please tell me which software you use for screen recording and secondly which software you use for removing background mic noise

codewithdaniel-
Автор

Great video! Been looking forward to this one and as usual, it didn't disappoint.

tadebaka
Автор

Am I hallucinating or did the most recent video disappear?

oliverer
Автор

What's the process in choosing the chip antenna? / Reason for the AMCA31-2R450G-S1F-T3?

justinleakey
Автор

I did everything like in the video, the code uploads without any errors, but my device is not discoverable in ST BLE app. Can someone help?

ihsandevil
Автор

noice!
Please make a tutorial on making a very simple usb stm32 device that is not the common USB keyboard/mouse/serial hid. A custom USB device that will be detected as Phil's USB MCU. windows driver for this Phil's USB MCU and a simple C terminal program that will take user input to send 'a' or 'b' to turn on/off a led. I have already exhausted all google search results.

nafisahmed