Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

PURGE COMPLETE.


devel / comp.arch.embedded / Help with a HardFault on Cortex-M3

SubjectAuthor
o Help with a HardFault on Cortex-M3pozz

1
Help with a HardFault on Cortex-M3

<teql6h$27k05$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=996&group=comp.arch.embedded#996

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: pozzu...@gmail.com (pozz)
Newsgroups: comp.arch.embedded
Subject: Help with a HardFault on Cortex-M3
Date: Thu, 1 Sep 2022 18:04:34 +0200
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <teql6h$27k05$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Sep 2022 16:04:33 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="47711076abbd3b56914c3cc1212fc8cc";
logging-data="2347013"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JYCSgAKJ1J5aVD1FXZ8sqSlxQYJOUWR4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.13.0
Cancel-Lock: sha1:NYlPIlu7SvsP4PiKr9QWDEA1g+0=
 by: pozz - Thu, 1 Sep 2022 16:04 UTC

I'm stuck with a stupid issue on a Cortex-M3 (LPC1788 by NXP).

It's a classical issue that happens randomly and in different ways when
the code is slightly changed, so it's very difficult to debug.

MCUXpresso (IDE from NXP) and Ozone (a software from Segger) says that
IBUSERR and FORCED are set when HardFault exception occurs. I understand
it is related to a program counter with a wrong address, maybe a
corrupted function pointer. Indeed, when the HardFault triggers,
MCUExpresso shows the stacked PC register as 0x824490, that is
definitely wrong.

Stacked LR should say something about the calling function
(GUI__DoAlphaBlending of emWin). Following disassembly the faulty
instruction should be:

bx r3

Stacked R3 (at the fault moment) is 0x24491 (_GetDevProp of emWin), that
should be correct, but stacked PC is 0x824490. It seems the 20-th bit
was flipped for some reason.

I can't explain why this happens, except for a hardware issue with the MCU.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor