Writing to unintialized peripheral causes iMX8 to completely lock up

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Writing to unintialized peripheral causes iMX8 to completely lock up

461 Views
gauravmp
Contributor I

Hi,

Our system is as follows: We use an iMX8QM on a Toradex SOM. We run QNX 7.1 on it. Our application uses the A53 cores only. The A72 cores are disabled.

Background: We have an issue in our system that causes a lock up of the whole system. This in turn causes a watchdog reset (configured in the M4 core of the iMX8). We know (or strongly suspect) that this isn't just a kernel lockup or a software deadlock because none of QNX's utilities work. Try take our word for it.

However, we've discovered unintentionally that we were able to reproduce the same symptoms and behavior when we write to a peripheral (in this case GPT3 from the LSIO subsystem) that hasn't been initialized in the BSP. So, in QNX's bsp we don't have GPT3's power or clock enabled. And when we try to write to any of its control registers from the application (by mmap'ing its device registers into the process's address space), the iMX8 goes into an un-recoverable state.

So we suspect that somewhere in our application, we have corrupted heaps or stacks that are causing unintentional writes to device registers that is resulting in putting the system to an unrecoverable state.

A few questions we have:

1. Would you know why the system is going into an un-recoverable state in this case?

2. Can we configure some sort of memory protection unit to prevent unintentional writes to device registers?

3. Does the imx8 have any kind of exception handling that we can configure so we can get a stack trace?

We unfortunately do not have a hardware debugger at the moment so we're tied to QNX's utilities which unfortunately won't work if the CPU completely stalls.

If you have any insight into this kind of an issue - it would be helpful.

Thanks.

0 Kudos
Reply
1 Reply

436 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

This may be caused since the peripherals is in a different domain, in the default state partitioning, GPT3 is part of the CM4_1 partition.

There may be a possible way to restrict this by using some kind of secure world, like optee, but haven’t really done this before.

Usually it is SCFW which will handle this access,. So I could recommend using the testing functionality inside it.

In general, any hangs when running the tests indicate lack of power from the PMIC, incorrect board configuration, or improper DDR configuration.

Please refer to the SCFW porting guide documentation, chapter 3.11 Testing.

Saludos,
Aldo.

0 Kudos
Reply