Resets from unknown reason

I have used the nRF52832 on a few dozen projects, usually at 3.3V etc. On this project I have it at 1.8V, which may be related, but spec is 1.7V min, and the 1.8V supply is solid. Even assured by adding 1F cap across Vcc, and checked on a scope - no glitches. I am getting repeated resets, after my firmware runs for a short time (less than 1 second). The RESETREAS register has bits 2 & 3 set. Those are described as "soft reset detected" and CPU "lock-up detected". I am not running a softdevice, nor any of the Nordic libraries other than the startup code - this configuration is an attempt to isolate the problem to something in the softdevice. What should I be looking for?

My code at this point is just running UARTE to tx and rx at 115200 BPS, the RTC module, and PWM, all done by direct register writes and no library calls. I tried commenting out the PWM setup, and the "CPU lock-up" indication went away, so I have some work to do there.

Can you please describe exactly what hardware conditions can cause the two reset reasons I'm seeing?

Parents
  • Unofficial, but in case a quick response helps: the memory location may be incompatible which can cause a CPU lock-up:

    static nrf_pwm_values_individual_t PWM_DigitTable[] = {0, 1, 2, 3};
       // This works:
       pNRF_PWM->SEQ[0].PTR = (uint32_t)PWM_DigitTable;
    
    static const nrf_pwm_values_individual_t PWM_DigitTable[] = {0, 1, 2, 3};
       // This generates a hard fault or cpu lockup:
       pNRF_PWM->SEQ[0].PTR = (uint32_t)PWM_DigitTable;
    

    PWM data must reside in RAM not FLASH.

    The "soft reset" is a software reset, perhaps caused by the PWM error but also issued, for example, when setting modes in SystemInit():

    // Generate a soft reset
    NVIC_SystemReset();

  • Thank you for the very quick response. The PWM data is definitely in RAM, being updated fairly often. I'm guessing it must also be 32-bit aligned, so that will be my next line of attack.

Reply Children
No Data
Related