This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Not able to execute while (1) loop after soft reset using GPIO interrupt

Hi,

I am developing project using nrf52840 and currently developing  using SDK 3.0. (Once I complete my feature I will update to SDK4.1).

I am using the light bulb firmware (using ZigBee) available in the SDK

I wish to soft reset the device and start again using GPIO interrupt.
For this I have configured 1 on board dev-kit button and configured interrupt handler for same.
To reset I used NVIC_SystemReset() function. When I press button my interrupt get executed and also NVIC_SystemReset() function.
I can see that my variables are getting default values but while(1) loop is not executing after soft reset.
And In while(1) loop I have written my state machine State_Ready to State_End where I do some data handling tasks as per my requirement.
But due to while(1) loop not executing after NVIC_SystemReset() unable to execute state_machine also.

Any help will be greatly appreciated.

Thanks and regards

Ankeet Gugale

Parents
  • Hi

    As the main() loop starts over again once you reset your device, all the initializations will start over as well. I think you need to do some debugging to find out at what point your application stops/fails, as it must be halting somewhere before this while loop is called. I would try setting break points at various functions in the main loop to see if one of the inits fail for some reason (maybe something isn't uninitialized correctly when the device is reset for example).

    It could also be that the state machine is in an invalid state at the moment of the reset, that's hindering it from starting up again after the reset.

    Best regards,

    Simon

  • Hi,

    Thank you for the response.

    As per your suggestion I did step by step after NVIC_SystemReset();
    I posted query when I tested on SDK3.0 for zigbee and thread but I upgraded to SDK 4.1 for Zigbee and thread again tested same but this time while() loop executed so I am using SDK4.1. So the problem seems to be solved. 

    And as nordic engineers are on leave and we have late response, I need one more help and which little urgent for me so I am requesting you here. I request you to help me with this query also.

    I want my attribute reporting should happen automatically. For my project I am using nRF52840 and deCONZ gateway for communication. So whenever I write on attribute on gateway GUI it not reflecting unless and untill I click on Read.

    I have our nxp based product which works perfect with attribute reporting when the reporting interval in changed using deCONZ. Same I want to implement in nRF. It will be helpful if you could explain us how to handle the attribute reporting in nRF.

    Thanks and regards

    Ankeet Gugale

Reply
  • Hi,

    Thank you for the response.

    As per your suggestion I did step by step after NVIC_SystemReset();
    I posted query when I tested on SDK3.0 for zigbee and thread but I upgraded to SDK 4.1 for Zigbee and thread again tested same but this time while() loop executed so I am using SDK4.1. So the problem seems to be solved. 

    And as nordic engineers are on leave and we have late response, I need one more help and which little urgent for me so I am requesting you here. I request you to help me with this query also.

    I want my attribute reporting should happen automatically. For my project I am using nRF52840 and deCONZ gateway for communication. So whenever I write on attribute on gateway GUI it not reflecting unless and untill I click on Read.

    I have our nxp based product which works perfect with attribute reporting when the reporting interval in changed using deCONZ. Same I want to implement in nRF. It will be helpful if you could explain us how to handle the attribute reporting in nRF.

    Thanks and regards

    Ankeet Gugale

Children
Related