You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Victor Benso <vb...@gmail.com> on 2022/09/06 22:35:30 UTC

Question about ESP32 PC address.

Hi,

I'm dealing with an interesting situation regarding a WDT lock in the
esp32-devkitc board.
Some details:
-SPI3 has 2x MCP2515 under heavy canbus traffic.
-SPI2 has an SDCard in SPIMode.
-TWAI is also receiving a reasonable CAN traffic.
-Wifi is connected to an AP sending data from the SDCard to a remote server.
-Sidenote: The board is using an external power supply so I'm discarding
any power issues.

In single core mode, the whole system (logging app + uploading app) works
fine (CPU Load around 90%), when enabling SMP the system works well for a
while with sporadic WDT resets. The logging app is responsible for feeding
the WDT, and in SMP although I can get much faster uploads, sometimes the
board is reset by the WDT.

If the uploading app isn't running, the system will not be reset by the WDT.
The fact that I find unusual is one of the PC values reported on board
reboot after the WDT reset.
Let me show:
W (197) boot.esp32: PRO CPU has been reset by WDT.
W (202) boot.esp32: WDT reset info: PRO CPU PC=0x4016decc (waiti mode)
W (209) boot.esp32: WDT reset info: APP CPU PC=0x7278b09a

W (202) boot.esp32: WDT reset info: PRO CPU PC=0x4016decc (waiti mode)
W (209) boot.esp32: WDT reset info: APP CPU PC=0x7278b09a

W (202) boot.esp32: WDT reset info: PRO CPU PC=0x400d8cd0
W (208) boot.esp32: WDT reset info: APP CPU PC=0x7278b09a

W (197) boot.esp32: PRO CPU has been reset by WDT.
W (202) boot.esp32: WDT reset info: PRO CPU PC=0x400f8fb4
W (208) boot.esp32: WDT reset info: APP CPU PC=0x7278b09a

Besides all the SMP related issues that most likely I failed to figure out,
I would really like to know what kind of address is this at the APP CPU
0x7278b09a
Addr2line failed to decode that address. The most similar address that I
could find is 0x4008b89a (this address is inside pm_dream).
Anyways, the MAIN question is:

Where does 0x7278b09a points to?

Thanks for your time,

Victor A. P. Benso

(47) 999-229-599
(65) 999-186-147

Re: Question about ESP32 PC address.

Posted by Nathan Hartman <ha...@gmail.com>.
On Tue, Sep 6, 2022 at 8:12 PM Gregory Nutt <sp...@gmail.com> wrote:

> Might be a corrupted address; 0x7278 is ASCII "rx".  Could be stack
> overflow corrupting the address.


Interesting! I hadn't considered to check what the ASCII values of the
pointer address might be. This will be a valuable addition to my debugging
toolbox in the future, for sure!

Nathan

Re: Question about ESP32 PC address.

Posted by Gregory Nutt <sp...@gmail.com>.
Might be a corrupted address; 0x7278 is ASCII "rx".  Could be stack
overflow corrupting the address.

On Tue, Sep 6, 2022 at 5:37 PM Nathan Hartman <ha...@gmail.com>
wrote:

> On Tue, Sep 6, 2022 at 6:35 PM Victor Benso <vb...@gmail.com> wrote:
> > Besides all the SMP related issues that most likely I failed to figure
> out,
> > I would really like to know what kind of address is this at the APP CPU
> > 0x7278b09a
> > Addr2line failed to decode that address. The most similar address that I
> > could find is 0x4008b89a (this address is inside pm_dream).
> > Anyways, the MAIN question is:
> >
> > Where does 0x7278b09a points to?
>
> Do you have the linker map file available? That should make it
> possible to find where this address is.
>
> Actually, before that: Is this address within the range of possible
> addresses? (As opposed to some random garbage that ended up in PC
> somehow.)
>
> Nathan
>

Re: Question about ESP32 PC address.

Posted by Nathan Hartman <ha...@gmail.com>.
On Tue, Sep 6, 2022 at 6:35 PM Victor Benso <vb...@gmail.com> wrote:
> Besides all the SMP related issues that most likely I failed to figure out,
> I would really like to know what kind of address is this at the APP CPU
> 0x7278b09a
> Addr2line failed to decode that address. The most similar address that I
> could find is 0x4008b89a (this address is inside pm_dream).
> Anyways, the MAIN question is:
>
> Where does 0x7278b09a points to?

Do you have the linker map file available? That should make it
possible to find where this address is.

Actually, before that: Is this address within the range of possible
addresses? (As opposed to some random garbage that ended up in PC
somehow.)

Nathan