Skip to main content
AFili.1
Visitor II
January 11, 2021
Question

Hard Fault when dicrease core freq on F373

  • January 11, 2021
  • 2 replies
  • 837 views

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!

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
January 11, 2021

Sounds like memory leak, exacerbated perhaps by the mcu trying to keep up with some external event stream at the lower clock rate.

JW

Tesla DeLorean
Guru
January 11, 2021

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.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..