This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Compiler get stuck in side nrf_crypto_hash_update() function

Hi i am using nordic nrf52840 chip. and SDK17.1 i am using.

in that under secure bootloader code i am trying to use the nrf_crypto_hash_update() function to calculate the hash of my application code.

But when compiler reached to this function then it got stuck somewhere. 

Any idea y this happened. is i need to enable something in the code for hash calculation...?

Regards

Rohit Saini

  • Hi Rohit, 

    I'm taking over the case from Vidar as he is on vacation. 

    The reason why the bootloader calling nrf_bootloader_app_start() is that in nrf_bootloader_init() the default behavior for dfu_enter (to stay in secure bootloader) is false. And if there is no condition that set dfu_enter to true ( see dfu_enter_check() ) it will execute nrf_bootloader_app_start() instead of staying in dfu mode. 


    So what you need to do is to either add a new condition inside dfu_enter_check(). So that it will set dfu_enter to true if the IsSignatureVerified() return false. 
    Or you can add a new flag/argument inside nrf_bootloader_init() call, for example nrf_bootloader_init(dfu_observer,verification_failed);
    And in nrf_bootloader_init() you can set dfu_enter = verification_failed; as the initializing value for dfu_enter. 

Related