Hard Fault When Using STM32 Nucleo-F446RE with Wiznet W5500 via SPI
I am using an STM32 Nucleo-F446RE with the Ethernet Wiznet W5500 via SPI. The SPI is configured as Master, CPOL = Low, CPHA = 1st Edge, 8-bit data, BaudRatePrescaler = 16. I see correct SPI waveforms on the oscilloscope, but I encounter a hard fault when debugging.
I have disabled other SPI modules to avoid conflicts. Here is the relevant initialization code:
Fault registers when the crash occurs:
Could someone please help me resolve this issue?
.
I have disabled other SPI modules to avoid conflicts. Here is the relevant initialization code:
Fault registers when the crash occurs:
- CFSR:
0x00000002(Data bus error) - HFSR:
0x40000000(Forced hard fault) - BFAR:
0x20001000(Faulty memory access)
Could someone please help me resolve this issue?