-
Notifications
You must be signed in to change notification settings - Fork 1k
Nucleo 32 G431KB: SPI not working as expected #2400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @acunipisa Arduino_Core_STM32/variants/STM32G4xx/G431K(6-8-B)(T-U)_G441KB(T-U)/variant_NUCLEO_G431KB.h Line 106 in 7efecbf
See the wiki to know how do this. |
I appreciate your support. Indeed, I changed the pins using the following code, but still not signals on the lines. I am wondering if it has something to do with the JTAG interface.
Edit: I am also checking the schematic. PB3 is connected to D13. Maybe I am missing something else.. I attached the complete schematic as well. |
Why this: |
Using core 2.6.0. I may try to use the new one. |
Even with 2.6.0 you should not use argument for begin and drive yourself the CS pin. |
Installed core 2.7.1. Removed the "1". If I do not modify the pins, I can observe the signals on PA7 and PA5, as expected. However, when I change the pins, the code gets stuck when I set PB3 as SPI CLK. If I do not, MOSI is correctly observed on PB5.
|
By the way, the SCLK cannot be routed to PB3, and I cannot understand why. From the stm32g431kb datasheet it should be possible (indeed the manual of the nucleo32 board and the layout suggest that as well). I will keep investigating. |
First, let me thank you for taking the time to test the code on another board. Your tests inspired me to try programming the Nucleo32 as a generic G431KB board variant, and it worked like a charm. However, when I tried again as a Nucleo32, it failed. Therefore, the issue only occurs when the Nucleo32 variant is chosen. I can live with this workaround, but wanted to let you know. EDIT: made a few tests with
when using nucleo variant they return 0 and 268435456 respectively. When using generic g431kb variant they return 1 and 19. |
Really strange. Will check that. |
Fixes stm32duino#2400. Signed-off-by: Frederic Pillon <[email protected]>
OK. Found the issue, it misses some |
Great. Thank you for your work. Bests |
If you can test to validate this is the only issue 😉 |
Tested, It works! Thank you! |
Describe the bug
Using a Nucleo 32 stm32g431kb for SPI communication. After removing SB4 jumper (to disconnect PB3, or D13, from SWO of the on board stlink), SPI is not working as expected using stmduino core.
No signal on SCK (D13, or PB3) can be observed using an o-scope. The same is true for MOSI (D11, or PB5).
To Reproduce
Nucleo32 gk431kb with SB4 jumper removed. Plug USB, and upload the code using Arduino IDE 2.3.2.
Expected behavior
Normally, I would expect the SPI lines to show signals according to the communication protocol.
Desktop (please complete the following information):
Board (please complete the following information):
The text was updated successfully, but these errors were encountered: