I am working on a project with STM32G431C8U6. My code always goes to HardFault Handler. I created a new project for testing my MCU just an easy code, code went to HardFault again. I share my ScreenShoot's please help....
Check that the hspi is valid. Could be an overrun corrupting it.
Can you access this memory outside of the HAL_SPI_Transmit function?
Check the SPI limitations in the errata-sheet related to your device.
Imen
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks