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.

RTOS/CC2640R2F: Problem with reset in software

Part Number: CC2640R2F

Tool/software: TI-RTOS

Hi,

I am working on the watchdog, and are looking for a way to reset the CC2640R2F, my problem is that the code does not start running after reset pin is pulled low, or after any system reset events.

I have tried:

1. Manually pulling the RESET pin low.

2. Using watchdog with
    watchDogParams.resetMode = Watchdog_RESET_ON;

(have tested watchdog with RESET_OFF ann callback just printing a message, that  works fine)

3. Running SysCtrlSystemReset(); after startup.

None of these are making the code run from start. Can you help me along the way.

The board is a custom board, and is running fine from Debugger. The board is connected to debugger via cJTAG the whole time.

What can be the problem, do I need to tell the chip to start at the beginning again in some way? If so, How?

The project is based on the simple_peripheral_offchip_OAD with BLE5 stack. Can this have something to do with the BIM?

When running the pogam from the debugger, CCS is losing contact, so there is a reset happening, its just the restart og the code that is not working.

Update:

SysCtrlSystemReset(); is working when using the uartEcho example, but when trying with the Simple_peripheral_OAD_offchip (unedited example project) SysCtrlSystemReset(); is not working.

Thanks in advance.

Best Regards,

Viggo

  • Hi Viggo,

    Does the Simple Peripheral Off Chip OAD Example Program works at your custom board with board files modified according to your custom board? Try this first without watchdog or calling system reset.

    I have implemented Watchdog at CC2640R2F, you need to clear or reset the Watchdog at your main RTOS Task just after Event_pend code line. If you don't do this the Watchdog will trigger a Device Reset.

    I also suggest trying Watchdog and System Reset using CC2640R2F Launchpad.

    - kel
  • Hi,

    Thanks for helping.

    The program work fine on the custom board. I have also tried installing a fresh SDK placement in a different location and used this to test.
    The program work fine like this, but no reset.

    I also tried running the program on the CC2640R2F_LAUNCHXL board, but still the same problem.
    That is, it is not resetting properly on the devboard with a all fresh install of the project and SDK.

    I tried with wrinting the register as well:
    HWREGBITW( AON_SYSCTL_BASE + AON_SYSCTL_O_RESETCTL, AON_SYSCTL_RESETCTL_SYSRESET_BITN ) = 1;

    no luck.

    I removed the watchdog, as this should not affect any og this. Trying ti get the nomal softreset to work first.

    any ideas?

  • Hi Viggo,

    Try HAL_SYSTEM_RESET(). I have used this with CC2640R2F Launchpad and Custom CC2640R2F Board and it works.

    In debug mode after you debug step after HAL_SYSTEM_RESET(), you will notice the debugger to disconnect. Meaning a CC2640R2F Reset happened.

    - kel
  • HI,

    Thank you, the HAL_SYSTEM_RESET() worked.

    I found this text just above the macro as well:
    "// Perform the equivalent of a PIN Reset (hard reset).
    // The cc26xx system has not been design to handle soft reset.
    // Making a soft reset can make the system unstable.
    // All soft reset needs to be replace by Hard reset."

    Also, I noticed that while the Debugger was connected, the board could not reset. I am using the CC2640R2F_LAUNCHXL devboard with the XDS110, and all jumpers removed. I had to unplug the power to this board to get the reset functioning correctly.

    Regards,
    Viggo