2024-09-06 12:49 AM - edited 2024-09-06 01:08 AM
I am trying to establish communication between two Nucleo boards (STM32G431RB as master and Nucleo F446RE as slave). I used the example codes from the STM32 GitHub page (NUCLEO-G431RB/Examples/SPI/SPI_FullDuplex_ComPolling_Master and STM32F411RE-Nucleo/Examples_MIX/SPI/SPI_FullDuplex_ComPolling). I made some changes to the slave code, including GPIO settings, but the communication still doesn't work. I chose NSS as [ hspi1.Init.NSS = SPI_NSS_SOFT; ]. The codes also include LED configurations as mentioned in the README files, which indicate an error based on the LED status.I know I have an error acording to led 2 but I don't know the problem.
LED2 toggles slowly when there is a timeout or an error in transmission/reception process.
2024-09-09 06:51 AM
2024-09-09 07:27 AM
The code that I provided is for NUCLEO- G431RB as you mentioned on your first question and not for NUCLEO-G474RE.
You need to understand why you are getting a hardfault instead of changing from Full to half duplex. The code that I shared work fine.
2024-09-09 12:20 PM - edited 2024-09-09 12:26 PM
@Saket_Om Yes I am using the NUCLEO- G431RB board not NUCLEO-G474RE ( realized the wrong file name in error log when you mention it , I will retry it with the right file ). How can I found why I’m getting a hardfoult error , do you have any suggestions for me look or any steps I should fallow to indicate the problem ? I’m new to stm32 boards and embedded systems.
2024-09-16 02:30 AM
Hello @nesnes
Any update concerning your issue. Is the code that I provided work finally?
Are you still getting hardfault ?
2024-09-16 03:27 AM
@Saket_OmNo it did not work , I couldn't found the problem.
2024-09-16 06:34 AM
Hello @nesnes
Could you please share your project so that I can reproduce the issue?