Skip to main content
MLang.7
Associate III
May 1, 2021
Question

HardFault PRECISERR using FDCAN1

  • May 1, 2021
  • 2 replies
  • 1306 views

Good morning,

Im using the CAN-Module of STM32H743 NUCLEO board and so far I'm quite happy with it. But now I ran in to this hard fault error which seems to occur at a random point in time, but it will appear sooner or later. Using the built in Fault Analyzer I can see, that a data access violation (PRECISERR) is the cause of the error. From the content of r2 and r3 I can tell, that the error is related to the message reception.

Can someone please make some suggestions how to solve this problem?

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
May 1, 2021

Debug it like any other flaw in your code.

Almost certainly due to buffer or pointer corruption, either within existing structures, or those on the stack.

Add sanity checking to the code close to the point of the identified fault, perhaps with asserts or similar methods.

Have and effective Hard Fault Handler that can output actionable information, so you can identify the memory area that triggers the fault. Precise means its a read of some sort. Look at the faulting code, and that immediately prior and relate that to the source, and the code flow at that point,and where those values came from.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
MLang.7
MLang.7Author
Associate III
May 3, 2021

Thank you for your quick reply. Is there a way to find out, what part of my program was executed right before the error?