Hi,
I am developing an application with the nRF5340 microcontroller.
I need to use the I2C module, but if I insert the CONFIG_I2C=y
configuration in my prj.conf
file, the application doesn't work.
The firmware has been compiled, but when running it gives me the following error:
00> [00:00:00.254,638] <err> os: ***** BUS FAULT *****
00> [00:00:00.254,638] <err> os: Precise data bus error
00> [00:00:00.254,638] <err> os: BFAR Address: 0x0
00> [00:00:00.254,669] <err> os: r0/a1: 0x000258f0 r1/a2: 0x000258f8 r2/a3: 0x00000000
00> [00:00:00.254,669] <err> os: r3/a4: 0x0000000c r12/ip: 0x00000001 r14/lr: 0x00021e39
00> [00:00:00.254,669] <err> os: xpsr: 0x81000000
00> [00:00:00.254,699] <err> os: Faulting instruction address (r15/pc): 0x00017a28
00> [00:00:00.254,730] <err> os: >>> ZEPHYR FATAL ERROR 25: Unknown error on CPU 0
00> [00:00:00.254,730] <err> os: Current thread: 0x2000a740 (unknown)
00> [00:00:00.525,024] <err> fatal_error: Resetting system
So I understand that I need to change my board from nrf5340dk_nrf5340_cpuapp_ns to nrf5340dk_nrf5340_cpuapp.
In this mode, the application works without errors.
However, I would like to understand more about these boards because now I see a yellow triangle with the following suggestion:
"You are going to build without Cortex-M Security Extensions. Consider selecting the nrf5340dk_nrf5340_cpuapp_ns board target to better protect sensitive assets and code. In the _ns version of the board target, TF-M is automatically built as the secure firmware image."
So can you help me understand what is the difference between nrf5340_cpuapp and nrf5340_cpuapp_ns?
Why can't I use nrf5340_cpuapp_ns and I2C module together?
At this point is it better to use nrf5340_cpuapp instead of nrf5340_cpuapp_ns? Does "ns" stand for not sure?
Thank you.