How does the advertise with timeout function work?
static const struct default_handlers_configuration user_default_hnd_conf = { // Configure the advertise operation used by the default handlers // Possible values: // - DEF_ADV_FOREVER // - DEF_ADV_WITH_TIMEOUT .adv_scenario = DEF_ADV_WITH_TIMEOUT,
// Configure the advertise period in case of DEF_ADV_WITH_TIMEOUT. // It is measured in timer units (3 min). Use MS_TO_TIMERUNITS macro to convert // from milliseconds (ms) to timer units. .advertise_period = MS_TO_TIMERUNITS(5000),
I have defined the above configuration. Advertisement timeout shall happen after 5 seconds.
After the timeout, which callback shall get called?
I want to advertise for 5 seconds then have a timeout and go to deep sleep mode. Then upon pressing a GPIO, my dialog will wake up and restart advertising. How shall I do?
Which callback/function shall I put the button wakeup press function so that when I press SW2 in dialog board, my system wakes up?
When will the below callback function be called?
Hi Satakshi,Thank you for the reply.
Satakshi_R said: When I remove the shorted J9 jumper, the blue LED goes off in the dev kit pro. After that, I start measuring it but it shows 0 in mA mode also and uA mode also. Is there any additional step I should do in smart snippets toolbox ?
Yes, the blue LED shows that the current circuit is active for the SmartSnippets Toolbox. No you would not need any other steps on the SmartSnippets Toolbox to measure the current consumption.Regarding the OTP:Are you able to see your device advertising or scanning?Please refer on the AN-B-072, on section 10. Boot from OTP, on page:22 and on section 4.Booting Sequence and Booting PinsBest Regards,OV_Renesas
Thanks a lot for the reply sir
One query if the steps are not properly followed or if I miss one step and burn the code in OTP wrongly will it damage the daughterboard?
Hi Satakshi,Thank you for the reply. It will not damage the daughterboard, but you will not be able to burn another firmware onto the OTP. If you burn any FW into the SPI Flash, does the DA14531 start advertising/scanning or is it stuck? Which steps exactly did you miss for the OTP programming?Best Regards,OV_Renesas
I forgot these steps in the software
#undef CFG_CODE_LOCATION_EXT #define CFG_CODE_LOCATION_OTP
#undef CFG_DEVELOPMENT_DEBUGI need to check with the SPI flash programmer also.After burning the FW in OTP, I am not able to do debugging in keil. AFter compilation of code,if I try to enter into debug mode, it shows the following:
Hi Satakshi,Thank you for the reply.For some reason the J-Link is not able to recognize the SWD interface on the board.On the fw you burned on the OTP did you implement any sleep mode? In sleep the DA14531 has the debugger disabled. If the DA14531 crashes during sleep or cannot wake-up you will not be able to access it via SWD, you will need to do 1-Wire UART in order to access the DA14531.Another reason could be that you are handling the SWD interface pins inside your code, and the J-link cannot access them. Best Regards,OV_Renesas
Hello sir,
I have implemented sleep mode in the code I burned in OTP.
I am using SW2 as the wakeup controller inside code. I think the board is not able to wake up once it has gone to sleep because I had faced similar issues previously that after sleeping I was not able to wake it up.
Hi Satakshi,Thank you for the reply.That would make sense. The DA14531 has gone into sleep mode. You press the SW2 to wake-it up, it searched to find where the firmware is stored to restore the application but due to the fact that you did not implement the OTP programming the correct way, the DA14531 is not being to find the source code so it is stuck. I would suggest to try to 1-Wire UART programming to access the SPI Flash (via the SmartSnippets Toolbox) and you could possibly use this board for testing.Best Regards,OV_Renesas