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

Issue with mutex_init_platform

So I am doing a number of crypto operations. One of which for example is an ECDSA signing operation. I do that through mbedtls_ecdsa_write_signature which is using the CC310 layer to actually do the operations. That function calls ecdsa_sign_det_restartable, which calls mbedtls_hmac_drbg_init which eventually calls mutex_init_platform. 

mutex_init_platform has this line  

ret = k_mem_slab_alloc(&mutex_slab, &mutex->mutex, K_FOREVER);

Well during testing, when trying to run my function 100 times, I get stuck after 60 times (it works 60 times), It gets stuck here waiting forever. 

I am going to look into it some more and see if I can figure out why, but I wanted to check with you all first. I don't think I am doing anything wrong in my code. I am freeing all the mbedtls variables I init. I think I am passing good parameters. 

Parents Reply Children
Related