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

Unable to reboot with TF-M

Hi,

when I build a firmware with TF-M enabled the device gets stuck after a call to sys_reboot(...) no matter if I use the shell or call the function somewhere else in my code.

Regards

Caspar

Parents Reply
  • Just did. added the following:

    diff --git a/samples/tfm/tfm_hello_world/src/main.c b/samples/tfm/tfm_hello_world/src/main.c
    index 4ca26a9f..804d2339 100644
    --- a/samples/tfm/tfm_hello_world/src/main.c
    +++ b/samples/tfm/tfm_hello_world/src/main.c
    @@ -11,6 +11,8 @@
     #include <tfm_ns_interface.h>
     #include "psa/crypto.h"
    
    +#include <power/reboot.h>
    +
     #define HELLO_PATTERN "Hello World! %s\n"
    
     void main(void)
    @@ -47,4 +49,8 @@ void main(void)
     					i % 16 == 15 ? "\n" : "");
     		}
     	}
    +
    +	printk("about to reboot\n");
    +	k_sleep(K_SECONDS(3));
    +	sys_reboot(SYS_REBOOT_COLD);
     }

    gets stuck after printing about to reboot.

Children
Related