STM32WB5MMG SPI not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2025-04-02 5:58 PM - edited 2025-04-02 7:05 PM
Hi,
I made a custom board with the STM32WB5MMG module. The custom board contains just the STM32WB5MMG module with pins connected to some of the GPIOs of the module. I tried to interface this custom board with AD5940 potentiostat via SPI in order to get readings. I tested my code with the STM32WB5MMG-DK and the AD5940 board and it is working fine and I am getting the expected readings. But when I try to implement the same code with the custom board, the SPI communication fails. I am using the same pins I use in the DK board (PA1 as SPI1_SCK, PB4 as SPI1_MISO, PA7 as SPI1_MOSI and PA4 as SPI1_CS). I also tried changing the pins but the result is the same. I connected the custom board via USART pin to the computer and I get the following error in the terminal while trying SPI communication.
Just to check if I2C communication also fails, I tried I2C communication with the board and an NFC module (NTAG I2C PLUS) and it is also not working. It cannot read or write via I2C.
I have attached the schematic and pcb of the custom board I am using below:
It is a very simple board and I designed the circuit according to the datasheet. I also don't think it is an issue with the soldering since the USART is working fine (I connect it to computer via a FTDI adapter). I just want some insight on what might be wrong about my custom board. It should not be the code since it works perfectly fine with the DK board.
One thing I should mention is that the BLE also advertises fine for the custom board. Initially it wasn't working but then I found a post in the community where someone suggested upgrading the firmware which fixed the issue with the BLE and it started working fine. The other thing I should mention is that I am not connecting the 100 nF capacitor from PH3_boot pin to VDD. So PH3_boot remains unconnected (which according to the datasheet is grounded internally)
I am just wondering what I am doing wrong with the SPI.
- Labels:
-
I2C
-
SPI
-
STM32WB series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2025-04-04 3:49 AM
Hello,
I would recommend connecting a logic analyzer to the SPI pins to see how the signals look like.
Also, did you try to debug the project to see if it hangs somewhere or if any function returns error?
Best regards,
ST support
