2026-03-01 1:12 PM - last edited on 2026-03-02 1:45 AM by Andrew Neil
Hi all,
I recently designed and built a custom PCB for data acquisition and transmission through bluetooth using an STM32U575 as the main MCU and a BlueNRG-M2SA module for bluetooth data transmission configured as a Network Coprocessor. They are connected via SPI following the pinout on the BlueNRG-M2 datasheet and also looking at the X-NUCLEO-BNRG2A1 schematics. The BlueNRG-M2SA is connected to an external connector via SWD for flashing using an STLink-V3Minie. Resistor R13 is not usually soldered and is just used to enable the bootloader during image flashing. Schematic for the BlueNRG-M2 on the custom PCB provided below:
The problem is that I have not been able to achieve communication between the STM32U575 and the BlueNRG-2 module as whenever the main MCU waits for the IRQ signal from the BlueNRG-M2, it doesn't receive any and therefore returns BLE_STATUS_TIMEOUT and gets stuck after aci_hal_set_tx_power_level() during Device_init(). I have tried uploading different DTM images to the BlueNRG module, the ones on the BlueNRG-M2 website, both 2.1c & 2.1e and the ones provided with the BlueNRG-1_2 DK 3.2.3: DTM_SPI_M2SA.hex and also the NO_UPDATER version. On the MCU side, I am using the X-Cube-BLE2 middleware pack with HCI_TL set to Basic and HCI_TL_INTERFACE set to UserBoard and I have tried both the Beacon and SensorDemoBLE applications.
None of the previous has worked and I still get the same error always which seems to be that the BlueNRG-M2 is not generating the IRQ signal. I attach the STM32CubeIDE project I'm using to test just the BLE.
I have checked all suply voltages and they are correct for the MCU & the BlueNRG, they are both supplied with 3.3V.
If anyone knows something about this problem or knows any solution I will be grateful as I have been trying to solve this for more than two months. Also ask me for any additional information you might want to know about my build or configuration.
Thanks for the help!
Solved! Go to Solution.
2026-03-25 1:21 PM - edited 2026-03-25 1:21 PM
It seems like the BlueNRG module's crystal was dead.
I programmed it with the GPIO example code available in the DK and debugging it I saw that it stopped when initializing the HS crystal. I am know trying with another module and SPI seems to be alive
2026-03-02 1:45 AM
Welcome to the forum.
Please see How to write your question to maximize your chances to find a solution for best results.
Please show the full schematic - including the STM32.
Before committing to a custom PCB, have you got this working on known-good hardware; eg, the X-NUCLEO-BNRG2A1 with an STM32U5 Nucleo board?
Have you used an oscilloscope to verify your SPI signal integrity?
Have you used an analyser to verify your SPI comms?
2026-03-02 10:52 AM
I attach the full schematic including the STM32 and the BlueNRG-M2. The project has two other schematic pages but are not related to the problem and are not connected to the BlueNRG-M2, they are additional sensors and external connectors.
I did not test with the X-NUCLEO-BNRG2A1 due to time and resource limitations but anyway, as I connected the BlueNRG-M2 module as in the X-NUCLEO-BNRG2A1 board and the only connection with the STM32 was via the standard SPI protocol and an External Interrupt, I didn't expect there to be any problem regarding the physical connections. However, I fully understand that this would have been a wise step to try before building the custom PCB.
I don't currently have access neither to an oscilloscope nor a logic analyzer but I should get access to an osciloscope in the following days with which I plan to look at SPI signal integrity and also the physical IRQ signal. I will update when I have that measured.
2026-03-04 9:42 AM
I have finally gotten access to an Oscilloscope and the results are attached. As I imagined, the BlueNRG doesn't seem to produce the IRQ signal. The setup has been the same as I stated on the post, the BlueNRG-M2SA is flashed with the DTM_SPI_M2SA.hex provided in BlueNRG-1_2 DK 3.2.3 and the STM32 is flashed with the project I also provided in the initial post. The attached images show the following:
So after these tests I think I can conclude that the STM32 is working as expected but the BlueNRG-M2 is not generating the needed IRQ signal indicating that it is ready to communicate. If you need me to measure something else let me know and I will.
2026-03-25 1:21 PM - edited 2026-03-25 1:21 PM
It seems like the BlueNRG module's crystal was dead.
I programmed it with the GPIO example code available in the DK and debugging it I saw that it stopped when initializing the HS crystal. I am know trying with another module and SPI seems to be alive