This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Random Resets with CC1111 USB Dongle

I'm having a strange problem with a program for the CC1111 USB dongle: My program randomly reboots, sometimes after a few tens of minutes, sometimes after many hours.  I'm relatively new to embedded systems, so I might be making a rookie mistake.

I'm working on a breadboard prototype -- the dongle is wired up to a digital temperature sensor and a digital accelerometer via an SPI bus.  I'm using IAR EW8051 8.10.3.

I had been communicating with my program using serialport-over-USB, and thought perhaps the PC was responsible.  So I've removed that from the equation -- I have the dongle connected to a USB cable plugged into a powerstrip surge protector with a USB port.  All feedback now happens through the LED.

At the beginning of main() I check the SLEEP register to see the reason for the last reset, and set an LED blink pattern accordingly:

 

int main( void )

{  

    uint8 reset_cause = (SLEEP & SLEEP_RST) >> 3;

    if (reset_cause == 0)

        led_pattern = POWER_RESET_PTRN;

    else if (reset_cause == 1)

        led_pattern = EXT_RESET_PTRN;

    else if (reset_cause == 2)

        led_pattern = WATCHDOG_RESET_PTRN;

    else 

        led_pattern = ERROR_PTRN;


 

I take input from the dongle button.  On the first press, I change the LED pattern to a "default pattern" that is different from the others.  Then I wait.  Eventually, it restarts and the LED pattern tells me that the last reset cause was an external reset.  I can also produce this by sticking a paper clip or wire in the ribbon cable connected to the debug connector (pin 7).

If the button is pressed a second time, the program begins a ten second countdown and then calls halMcuReset(), which uses the watchdog timer to reset the uC. Ten seconds later, I see the WATCHDOG_RESET_PTRN I expect.

One weird thing is that if I disconnect the dongle from the USB cable (so no power), wait, and reconnect it, the LED pattern shows the EXT_RESET_PTRN, and not the POWER_RESET_PTRN.  This is making it impossible to determine whether power is the problem. When the dongle was still connected to the PC, I do believe I saw the POWER_RESET_PTRN at least once.

Any idea what could be causing this?  Can I trust SLEEP.RST?  

Thanks!

-David

 

 

 

 

 

 

  • To answer my own question, it looks like noise on the RESET pin is probably the culprit.  According to the datasheet, "The RESET_N pin is sensitive to noise and can cause unintended reset of the chip."  I assumed the USB dongle design took this into account, but perhaps not.

     

    What I found is that if the the debug ribbon cable is connected to the USB dongle debug port (whether or not the other end is connected to the SoC Debug Plug-in module), the uC will reset itself after some time (after tens of minutes up to tens of hours) .  However, if I disconnect the cable from the port, the system does not reset (or at least not after 5+ days in my last test).

     

    -David