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

SPM on nRF5340 not working

After following the "Using a custom Secure Partition Manager with your application" Guide for the nRF5340-PDK, I experienced following error:

I tried to create a Non-Secure application for the nRF5340. I followed this guide (using the template folder provided as .zip) and changed the Overlay file to nRF5340. After building and flashing, the output on /dev/ttyACM2 is the Peripheral-Configuration of the SPM and then it seems the MCU is resetted, since this is repeated forever.

What have I done wrong?

This is my Code (including the already built binary):

example1.zip

My Output:

*** Booting Zephyr OS build v2.1.99-ncs1-16-ge23d8ac48dd0  ***
Flash regions		Domain		Permissions
00 01 0x00000 0x08000 	Secure		rwxl
02 63 0x08000 0x100000 	Non-Secure	rwxl

Non-secure callable region 0 placed in flash region 1 with size 32.

SRAM region		Domain		Permissions
00 07 0x00000 0x10000 	Secure		rwxl
08 63 0x10000 0x80000 	Non-Secure	rwxl

Peripheral		Domain		Status
00 NRF_P0               Non-Secure	OK
01 NRF_CLOCK            Non-Secure	OK
02 NRF_RTC0             Non-Secure	OK
03 NRF_RTC1             Non-Secure	OK
04 NRF_NVMC             Non-Secure	OK
05 NRF_UARTE1           Non-Secure	OK
06 NRF_UARTE2           Secure		SKIP
07 NRF_TWIM2            Non-Secure	OK
08 NRF_SPIM3            Non-Secure	OK
09 NRF_TIMER0           Non-Secure	OK
10 NRF_TIMER1           Non-Secure	OK
11 NRF_TIMER2           Non-Secure	OK
12 NRF_SAADC            Non-Secure	OK
13 NRF_PWM0             Non-Secure	OK
14 NRF_PWM1             Non-Secure	OK
15 NRF_PWM2             Non-Secure	OK
16 NRF_PWM3             Non-Secure	OK
17 NRF_IPC              Non-Secure	OK
18 NRF_VMC              Non-Secure	OK
19 NRF_FPU              Non-Secure	OK
20 NRF_EGU1             Non-Secure	OK
21 NRF_EGU2             Non-Secure	OK
22 NRF_DPPIC            Non-Secure	OK
23 NRF_GPIOTE1          Non-Secure	OK
24 NRF_REGULATORS       Non-Secure	OK

SPM: NS image at 0x8000
SPM: NS MSP at 0x20010598
SPM: NS reset vector at 0x8c11
SPM: prepare to jump to Non-Secure image.
*** Booting Zephyr OS build v2.1.99-ncs1-16-ge23d8ac48dd0  ***
Flash regions		Domain		Permissions
00 01 0x00000 0x08000 	Secure		rwxl
02 63 0x08000 0x100000 	Non-Secure	rwxl

Non-secure callable region 0 placed in flash region 1 with size 32.

SRAM region		Domain		Permissions
00 07 0x00000 0x10000 	Secure		rwxl
08 63 0x10000 0x80000 	Non-Secure	rwxl

Peripheral		Domain		Status
00 NRF_P0               Non-Secure	OK
01 NRF_CLOCK            Non-Secure	OK
02 NRF_RTC0             Non-Secure	OK
03 NRF_RTC1             Non-Secure	OK
04 NRF_NVMC             Non-Secure	OK
05 NRF_UARTE1           Non-Secure	OK
06 NRF_UARTE2           Secure		SKIP
07 NRF_TWIM2            Non-Secure	OK
08 NRF_SPIM3            Non-Secure	OK
09 NRF_TIMER0           Non-Secure	OK
10 NRF_TIMER1           Non-Secure	OK
11 NRF_TIMER2           Non-Secure	OK
12 NRF_SAADC            Non-Secure	OK
13 NRF_PWM0             Non-Secure	OK
14 NRF_PWM1             Non-Secure	OK
15 NRF_PWM2             Non-Secure	OK
16 NRF_PWM3             Non-Secure	OK
17 NRF_IPC              Non-Secure	OK
18 NRF_VMC              Non-Secure	OK
19 NRF_FPU              Non-Secure	OK
20 NRF_EGU1             Non-Secure	OK
21 NRF_EGU2             Non-Secure	OK
22 NRF_DPPIC            Non-Secure	OK
23 NRF_GPIOTE1          Non-Secure	OK
24 NRF_REGULATORS       Non-Secure	OK

SPM: NS image at 0x8000
SPM: NS MSP at 0x20010598
SPM: NS reset vector at 0x8c11
SPM: prepare to jump to Non-Secure image.
*** Booting Zephyr OS build v2.1.99-ncs1-16-ge23d8ac48dd0  ***
Flash regions		Domain		Permissions
00 01 0x00000 0x08000 	Secure		rwxl
02 63 0x08000 0x100000 	Non-Secure	rwxl
....

Parents Reply Children
No Data
Related