How can I prevent a BLE timeout during my operations

Learn MoreFAQsTutorials

3 posts / 0 new
Last post
natebrune
Offline
Last seen:1 year 7 months ago
加入:2018-08-03 20:50
How can I prevent a BLE timeout during my operations

Hello, I am attempting to do cryptographic signing during a ble connection as a peripheral. The trigger for the signing is onwrite characteristic. The issue I keep seeing is the onwritecharacteristic exits cleanly after signing is completed, but I am immediately disconnected with the reason CO_ERROR_CON_TIMEOUT from the 0x0A task or LL2C.
If I remove the signing the operations complete as usual. To sign in production, I have to use wdg_freeze() and wdg_resume() after because it's an ~9 second operation to sign. Is there any way to issue a keepalive request while I am blocking, to stop the 14585 from timing out?

Device:
natebrune
Offline
Last seen:1 year 7 months ago
加入:2018-08-03 20:50
To those that find this post

To those that find this post in the future. Eventually I decided to break my ecdsa sign function into multiple smaller functions, particularly the scalar multiplication had to be completed in chunks where I GOTO_SLEEP and return from the user_on_system_powered in between chunks. Good luck to you if you're trying to do something similar it was a painful process.

PM_Dialog
Offline
Last seen:1 week 11 hours ago
工作人员
加入:2018-02-08 11:03
嗨natebrune,

嗨natebrune,

If the CO_ERROR_CON_TIMEOUT timeout occurs, it means that the devices have already lost the connection and the most possible reason is due to the WDOG expiration. The maximum watchdog timer time-out is 2.6 seconds and if it is expired you will get a full system reset or a Non-Maskable Interrupt (NMI). Breaking the ~9 second operation to multiple smaller function is the solution to your problem and thanks for your indication. Also, be aware that you can disable the WDOG. Please check the CFG_WDOG definition into da1458x_config_basic.h header file.

Thanks, PM_Dialog