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.

CC2640: HAL_SYSTEM_RESET

Part Number: CC2640


I have 2 hardware one is with CC2650EM_4XS and other one is using CC2650EM_5XD Package.

I am using a button which does two functions
1- Blink LED for 2 seconds
2- Then Restart the tag using HAL_SYSTEM_RESET();

In CC2650EM_5XD package both functions (LED and Reset) are working but in CC2650EM_4XS only led blinks and tag doesn't restarted. 

Is there anything which I am missing?

Thanks

Regards,
Sumair

  • Hi Sumair,

    Are these two different buttons? Or same button but first press is LED and second is reset?

    If you just do the reset, does the board reset?

    I'm thinking the issue may be related to IOs - It's hard to tell without more information. Can you reproduce this issue on a launchpad?

    Regards,
    Rebel
  • Hi Rebel,

    Button is same.

    On single press Tag should perform both functions (Blink LED for 2 seconds , Restart the tag)

    Please see the 'example' code  below;
    if((PIN_getInputValue(button) == 0) {

    LED_Blink(LED1,2000);  //Blink LED for 2 sec
    delay_ms(100);
    HAL_SYSTEM_RESET();

    }


    This code is working in hardware which is using CC2650EM_5XD package while in CC2650EM_4XS tag only LED blinks and Tag doesn't restart.

    Please let me know if you know any further information

    Regards,
    Sumair 


  • Hi

    Let me know if you need further information.

    Regards,
    Sumair

  • Hi Sumair Qureshi,

    Do you use TI-RTOS on CC2640 ?
    If you use TI-RTOS, You should use task_sleep instead of delay_ms. Besides, how can the LED_Blink function work?
    If you want to blink Led, you need set a task/timer/pwm to control the output of led.
    Do you debug your code?