2020-07-29 02:05 AM
Hi everyone,
First, my program was running good since many weeks and last week I added some code and from this day, each run of my program, i'm falling in hardfault handler... all the time in "HAL_SPI_Transmit".
First thing i've done is to increase (some times very big size) the heap & stack size, unfortunately it doesn't work.. I still fall in hardfault at the same location in my program.
My code is using the ST routine "HAL_SPI_Transmit" many times but it always run down at the same location in this ST routine.. (picture 1 & 2) (btw each times the routine is used to access a flash memory 1 Mbit SPI Serial Flash SST25VF010A).
So, I've investigate on the issue and I found that was a "bus fault" "PRECISERR" and "FORCED" (picture 3, 4 & 5).
I do some research on internet to find out the response to my issue and in found some one talking about error in SPI ST files so i tried to copy the new files (they were different than mine) but it doesn't work..
Picture 1 :
Picture 2 :
Picture 3 :
Picture 4 :
Picture 5 :
Picture 6 :
Is this a known issue ?
Can you help me ? If you have some ask i'm here ?
Thanks,
GOULWEN LE BOZEC,
Regards.
Solved! Go to Solution.
2020-07-29 06:32 AM
Check that the hspi object you're passing is valid. Could be an overrun corrupting it.
> each times the routine is used to access a flash memory 1 Mbit SPI Serial Flash SST25VF010A
Can you access this memory outside of the HAL_SPI_Transmit function okay?
Show the code you're using to call HAL_SPI_Transmit.
2020-07-29 06:32 AM
Check that the hspi object you're passing is valid. Could be an overrun corrupting it.
> each times the routine is used to access a flash memory 1 Mbit SPI Serial Flash SST25VF010A
Can you access this memory outside of the HAL_SPI_Transmit function okay?
Show the code you're using to call HAL_SPI_Transmit.
2020-07-29 07:21 AM
> Check that the hspi object you're passing is valid. Could be an overrun corrupting it.
I guess i found my issue !! you were right @TDK !
I was trying to put an array of 1000bytes (not always full but enough to corrupting it) in an array of 128bytes.
The @ of the hspi object was close to the little array so it corrupting it when there was an overflow!!
Thanks for you fast help @TDK.