2021-04-09 10:26 AM
The SPI rate is at 21MBit/s and I use STM HAL.
Data rate is high and I receive up to 1 message all 3ms.
After I tested my application I wanted to port it to a G4 to use a cheaper microcontroller.
When using the same code on the Nucleo G474RE and G431RE the SPI connections is not working correctly. After a short and irregular period the SPI interface delivers wrong values.
As example I read 2 bytes RSR register of the Wiz5500 and receive a value around 65000. The value in the RSR register can not exceed 2048 because it is the buffer size.
For G431RB I changed the clock multiplier after PLLM from x85 to x84 and APB1 + 2 Presclater to get the same clock values then F429ZI but the error is still there.
Attached are the settings of SPI1, CS_Pin and Clock Config for both microcontrollers. I checked the wiring three time and I am quite sure that this is not the problem.
F429ZI Clock SettingG431RB Clock Setting
F429ZI SPI1 Settings and Pins
G431RB SPI1 Settings and Pins
I think that there is a difference between SPI1 on both boards. The same issue occurs on STM32G474RE.
Please give me a feedback if necessary information is missing.
Thank you for reading this.
Any hint or tipp is highly appreciated.
Best regards
2021-04-09 11:30 AM
Check your SPI and CS signals with scope or analyser.