RT1064 spontaneously resetting - why?

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

RT1064 spontaneously resetting - why?

396 Views
damonb
Contributor III

Dear Support,

I have a custom board with a RT1064. I'm running your K.2.7.1 Bootloader, with custom modifications to add support for updating new application code over the CAN interface (CAN3), as I have no access to USB. I'm using the NXP CAN driver software (taking from a NXP demo app).

Everything works fine most of the time, but occasionally the MCU resets and the bootloader starts again.  This happens both with and without a Segger connected to JTAG. I've tried to find the reason by doing the following:

  • Replaced ALL the interrupt vector handling functions (except Reset and CAN3 IRQ) with my own handler, with a breakpoint.
  • Added code to the NVIC_SystemReset() function to write a known value to the GPR5 register, to be checked at start-up
  • Added code at start-up to print the value of the SRSR and GPR5 registers, to know the reset cause
  • Checked assert is not being hit (there are some asserts in the NXP code, e.g. in serial_packet.c)

All these steps has failed to find the cause. The SRSR register shows that the reset pin caused the initial boot (0x1) and then every reset following a successful application software update shows the custom value in GPR5, therefore it is a software-triggered reset. However, sometimes in the middle of updating, the MCU will reset, and the SRSR will contain 0x2, with GPR5 clear. According to the RT1064 Processor Reference Manual documentation, this means "Indicates a reset has been caused by CPU lockup or software setting of SYSRESETREQ bit in Application Interrupt and Reset Control Register". (There is no code apart from NVIC_SystemReset() which sets SYSRESETREQ).

So my conclusion is that there are only 2 possible reasons for the reset:

  1. "CPU lockup"
  2. Some kind of power glitch causes by high CAN bus traffic

The power glitch seems unlikely, because the application software utilises CAN quite heavily, and I've never seen a MCU reset when the application software is running.

So what is the definition of "CPU lockup"? Anything else I can do to find the reason for the reset?

Regards, Damon

0 Kudos
Reply
1 Reply

325 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @damonb,

The following community posts can provide you with some insight on why and how the CPU might enter a lockup state:

Solved: Re: KE04 Lockup reset - NXP Community
The easiest way to debug a lockup reset on RT1051 - NXP Community
The easiest way to debug a lockup reset on Cortex M7 - Architectures and Processors forum - Support ...

In general, the specific cause of a CPU lock up can be very diverse, so it is important to try and pinpoint as much as possible the general area of instructions that the CPU was executing before locking up. Try debugging specific areas or temporarily disabling specific modules to differentiate lockup occurrences. The following library might be able to help in this process: GitHub - armink/CmBacktrace: Advanced fault backtrace library for ARM Cortex-M series MCU | ARM Cort...

BR,
Edwin.

0 Kudos
Reply