Skip to main content
Associate
December 10, 2024
Solved

Different hard faults on STM32H562

  • December 10, 2024
  • 1 reply
  • 848 views

I have a problem here:
When calling strcat() on a target string with odd length and odd source, the controller goes into hardfault, SCB_UFST_UNALIGNED is set. 

If I deactivate the unaligned trap (SCB_CCR_UNALIGN_TRP == 0), the following happens.

The controller goes into hardfault on calling putchar(), SCB_BFSR_IBUSERR set. Many previous calls to putchar() work fine.

I use CUBEide with GNU Tools for STM32 12.3rel1.
The code has already been compiled for other STM32 derivatives and other versions of GNU Tools, and works fine on these systems.

Best answer by lors

I can't say exactly which action solved the problem, in this code some timers are used, the corresponding interrupt service routines were installed. I deactivated all these timers for the time being. So the problem was elsewhere.

1 reply

lorsAuthor
Associate
December 12, 2024

The Problem is solved.

mƎALLEm
Technical Moderator
December 12, 2024

Hello,

Please, put the description of the solution and mark it as solution.

Thanks.

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."