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.

CC1350: cc26xx contiki cpu reset

Part Number: CC1350

Hi,

I have some problems while using the function ti_lib_sys_ctrl_system_reset to reboot while running Contiki on TI Sensortag cc1350.

Background: There exists a process which continously sends request to download firmware from the server. During the download of each chunk, I use watchdog_periodic. At every 1024 bytes, these are flashed into the external flash drive. After the download of all the bytes are over, I use the above mentioned reset function to reboot.

however, i dont see it being rebooted. By seeing, I mean no blinking of leds and also no prints on the uart.

I am using dev debugger on the sensortag for being able to see prints. Would that be any issue?? Please inform me what should be done here.

Regards,

Amit

  • Hello Amit,

    Could you please describe what dev debugger you are using on the sensortag? From my experience, testing a program while in debug mode causes some unexpected issues especially when playing around with Watchdog and system resets.

    Can't you use a terminal program like TeraTerm to see the UART prints without having to actually be connected to the debugger?

    I just used ti_lib_sys_ctrl_system_reset() inside of my Contiki rpl-udp example in order to reset the board whenever it tries to connect to a server and when I let the device run freely, while still connected to the terminal on TeraTerm, I can see the board's periodic system reset by means of the LEDs and the UART startup printout.

    -Matt
  • Hi Matt,

    I am using the debugger dev pack ( www.ti.com/.../CC-DEVPACK-DEBUG).
    However, if I remove the debugger dev pack the sensortag reboots correctly after downloading all the bytes.

    I am now setting up the net-uart to see prints over TeraTerm.

    I have another issue. I have a loop which sends request every 3 second to the base station to send bytes. When, I remove the debugger, the sensor tag seems to get stuck after downloading some amount of bytes. I call the watchdog_periodic in the loop every second. I am not sure why it is getting stuck. I will get more clarity after I have the prints from net-uart.

    But if you have any ideas, please do tell me.

    Regards,
    Amit
  • Update: Currently, when i remove the timer of 3 seconds, and just send the request whenever a response has been received and processed completely. It happens after a random number of bytes being downloaded. It just gets stuck when i unplug and replug the usb to the debugger, it starts from the beginning.

  • Amit,

    I will look into possible hardware concerns that may be contributing to your issues. In the meantime, it may also be beneficial for you to reach out to the Contiki Developer's forum ( gitter.im/.../Developers ) to make sure that your implementation of Contiki is set up correctly and see if the problems you are experiencing are on the software side. Thank you for your patience!

    Best regards,

    Matt
  • Hi Matt,

    Thanks for your response. I believe , I have to look into the prospects of UIP buffer overflow or queuebuf overflow while receiving the packet. Because I always see it being stuck at the place after some fragments of the packets received.

    If I comment out the watchdog_start call in the main method, would that mean there wont be any restart due to watchdog timer? I just wanted to try this and check where the error is

    Regards,
    Amit
  • Amit,

    You are correct. Whenever I want to debug a Contiki project using the debugger I comment out watchdog_start(); in contiki-main.c so that there are no unexpected restarts that will cause a JTAG communication error during the debug session.

    -Matt