2021-01-10 11:30 PM
Hi,
I'm using STM32F373 for my project. When I'm using core freq >=36MHz everything is fine. But I need to decrease core freq for power consumption. When I run project with 12/24MHz Hard Fault is occurred in 1-5 secconds. Times is randoms. (Of course, if I'm using empty proj with "while" loop everything is fine too)
For more information I'm using:
FreeRTOS CMSIS V1
SDADC1,2,3
USB
DMA
Faul Analyzer:
Hard Fault Details - Bus, memory managment or usage fault (FORSED)
Bus Fault Details - Imprecise data access violation (IMPRECISERR)
In some task uses complex calculetions (for example calculation of thousands trigonometry functions ). And when I'm disable this task time of working increasing to 20-30 secs but Hard Fault is occurred anyway.
Below I attach clock config when hard Faul is occured
Thanks for answers!
2021-01-11 01:30 PM
Sounds like memory leak, exacerbated perhaps by the mcu trying to keep up with some external event stream at the lower clock rate.
JW
2021-01-11 01:55 PM
Look at what is actually faulting, and then decide the cause.
Looks to be a write, so consider your stack size, both for computation task, and interrupts/callbacks that might be occurring. Do some stack depth measurements to understand usage, especially under stress.
Fault inspection should be done with a dump of the registers and stack, and the assembly level instructions at, and immediately preceding the fault.
For imprecise walk back to the last STR instruction.