samples: tfm_ipc: Add reboot to sample
To test/showcase rebooting through TFM. Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
This commit is contained in:
parent
bb77186cc6
commit
02226e120e
4 changed files with 13 additions and 0 deletions
|
@ -20,6 +20,10 @@ non-secure configuration.
|
||||||
The sample prints test info to the console either as a single-thread or
|
The sample prints test info to the console either as a single-thread or
|
||||||
multi-thread application.
|
multi-thread application.
|
||||||
|
|
||||||
|
The sample reboots after 5 seconds to demonstrate rebooting with TF-M.
|
||||||
|
The sys_reboot call is routed to TF-M, since the nonsecure app is not allowed
|
||||||
|
to perform the reboot directly.
|
||||||
|
|
||||||
Building and Running
|
Building and Running
|
||||||
********************
|
********************
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ CONFIG_BUILD_WITH_TFM=y
|
||||||
CONFIG_TFM_IPC=y
|
CONFIG_TFM_IPC=y
|
||||||
CONFIG_TFM_REGRESSION_S=y
|
CONFIG_TFM_REGRESSION_S=y
|
||||||
CONFIG_TFM_PARTITION_AUDIT_LOG=n
|
CONFIG_TFM_PARTITION_AUDIT_LOG=n
|
||||||
|
CONFIG_REBOOT=y
|
||||||
|
|
||||||
# The Zephyr CMSIS emulation assumes that ticks are ms, currently
|
# The Zephyr CMSIS emulation assumes that ticks are ms, currently
|
||||||
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
|
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
|
||||||
|
|
|
@ -16,3 +16,7 @@ tests:
|
||||||
- "Connect success!"
|
- "Connect success!"
|
||||||
- "Call success!"
|
- "Call success!"
|
||||||
- "TF-M IPC on .*"
|
- "TF-M IPC on .*"
|
||||||
|
- "The version of the PSA Framework API is"
|
||||||
|
- "Connect success!"
|
||||||
|
- "Call success!"
|
||||||
|
- "TF-M IPC on .*"
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
#include <sys/printk.h>
|
#include <sys/printk.h>
|
||||||
|
#include <power/reboot.h>
|
||||||
|
|
||||||
#include "tfm_api.h"
|
#include "tfm_api.h"
|
||||||
#include "tfm_ns_interface.h"
|
#include "tfm_ns_interface.h"
|
||||||
|
@ -185,4 +186,7 @@ void main(void)
|
||||||
tfm_ipc_test_1006();
|
tfm_ipc_test_1006();
|
||||||
|
|
||||||
printk("TF-M IPC on %s\n", CONFIG_BOARD);
|
printk("TF-M IPC on %s\n", CONFIG_BOARD);
|
||||||
|
|
||||||
|
k_sleep(K_MSEC(5000));
|
||||||
|
sys_reboot(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue