Arm Mbed OS support forum

Mbed TLS idle issues


I am trying to use mbed TLS on a Nordic NRF52840 in a low power application. Unfortunately, as soon as I call mbedtls_platform_setup the idle hook isn’t called anymore and the current consumption goes through the roof. The thing is that even if I call mbedtls_platform_teardown immediately after it never goes into a low power state again. What am I doing wrong here?

Hi @bbugl
What Mbed OS version are you using?
Without knowing further information, it sounds to me that the Cryptocell clock was initiated in mbedtls_platform_setup(), but not terminated in mbedtls_platform_teardown() like it shoulde have been.
Perhaps there is an issue in the reference counter within the context, or there were changes that require updating the NRF52840 port.
I would suggest you open an issue in the Mbed OS repository for further communication
Mbed support

Hello @roneld01,

  • mbed Version is 15.5.1
  • reference counter seems to work. SaSi_LibInit and SaSi_LibFini should be called. I verified that with the debugger and a pin I switched on and off when when calling SaSi_LibInit and SaSi_LibFini respectively. I’m guessing that, the problem is in SaSi_LibFini.

thank you, i will open an issue.


Hi Benni,
Thanks. I doubt the issue is in SaSi_LibFini(), because this code hasn’t changed, and there was’t an issue with it. I think it is more in the platform porting, where a clock has not been terminated properly.


Has a solution been found for this issue? I’m struggling with the same problem.