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

esb_low_power_ptx_pca10040 button events

Hello,

I am trying to figure out how the button presses in the module esb_low_power_ptx_pca10040 are creating events?

I have done some research and do not see this module using app_button or bsp_button.

There is the event handler nrf_esb_event_handler but I can not figure out how the buttons are causing this handler to be called.

I am using a nrf52 demo board and SDK 12.2.0

Thanks,

Tim

Parents Reply Children
  • Hi Tim,
    From the description for the application:
    The system does not resume execution when it wakes up, but rather restarts and recovers the state of the system from the GPREGRET register.

    And it recovers the state with the recover_state().

     

    //Cheers

     

  • Thanks Martin, I missed that part in the description (or failed to read the description at all most likely and went straight to the code).

    I have some follow up questions about the esb examples if that is ok:

    In the description for esb_low_power_prx

    It states that the example application is always on, however, I am unable to get the main() loop to do anything after the power_manage() function is called. (I have added extra code to the main loop).

    I noticed the esb_prx module only uses the __WFE() command to clear the event register, where the esb_low_power_prx module uses __SEV() __WFE() __SEV().

    For my application on the Rx side, I would like to not have the cpu go to sleep at all, but just spin on my main() code performing other functions until a esb_rx event happens, then service the rx packet.

    (Note: I have not tried the esb_rx code yet, I just saw it this morning before I went to work).

    So my main questions are:

    1. Does the esb_low_power_prx module go to sleep even though the description says it doesn't?

    2. Does the esb_prx go to sleep even though it only uses __WFE()? I have done some reading and see that this may be the case. Is it possible to just call one __WFE() per event instead of looping on that to avoid the system going to sleep?

    3. Is there a way to clear events without the cpu sleeping?

    4. Is esb_rx compatible with esb_low_power_ptx? (UPDATE: I tried this and it isn't)

    Thanks for your help.

    Tim Winder

Related