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

TWIM usage in non secure application core

Hi,

We are currently porting our code to the newest nRf5340 chip.

Everything goes fine when the target is secure (not ending with "ns" and not defining "CONFIG_TRUSTED_EXECUTION_NONSECURE".

However, when changing the target to be "nonsecure", the I2C stops working, with every i2c_xxx function returning -EBUSY.

What do I need to do to enable i2c when using the non-secure target?

Our device tree is using the same philosophy as nrf5340dk, with a common dts file with 

&i2c2 {
	compatible = "nordic,nrf-twim";
	status = "okay";
	sda-pin = <34>;
	scl-pin = <4>;
	clock-frequency = <I2C_BITRATE_STANDARD>;
	zephyr,concat-buf-size = <520>;
	
	....
};

Regards

Giuliano

Parents
  • Hi,

    I just tried it. I now have a crash on startup:

    [00:00:00.002,685] <err> os: ***** BUS FAULT *****
    [00:00:00.002,685] <err> os:   Precise data bus error
    [00:00:00.002,685] <err> os:   BFAR Address: 0x4002b524
    [00:00:00.002,685] <err> os: r0/a1:  0x2000f370  r1/a2:  0x0001f82f  r2/a3:  0x200083b8
    [00:00:00.002,685] <err> os: r3/a4:  0x4002b000 r12/ip:  0x00000012 r14/lr:  0x0000001
    [00:00:00.002,716] <err> os:  xpsr:  0x81000000
    [00:00:00.002,716] <err> os: Faulting instruction address (r15/pc): 0x000184ec
    [00:00:00.002,716] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
    [00:00:00.002,716] <err> os: Current thread: 0x200091b8 (unknown)
    [00:00:00.657,623] <err> fatal_error: Resetting system[0m

Reply
  • Hi,

    I just tried it. I now have a crash on startup:

    [00:00:00.002,685] <err> os: ***** BUS FAULT *****
    [00:00:00.002,685] <err> os:   Precise data bus error
    [00:00:00.002,685] <err> os:   BFAR Address: 0x4002b524
    [00:00:00.002,685] <err> os: r0/a1:  0x2000f370  r1/a2:  0x0001f82f  r2/a3:  0x200083b8
    [00:00:00.002,685] <err> os: r3/a4:  0x4002b000 r12/ip:  0x00000012 r14/lr:  0x0000001
    [00:00:00.002,716] <err> os:  xpsr:  0x81000000
    [00:00:00.002,716] <err> os: Faulting instruction address (r15/pc): 0x000184ec
    [00:00:00.002,716] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
    [00:00:00.002,716] <err> os: Current thread: 0x200091b8 (unknown)
    [00:00:00.657,623] <err> fatal_error: Resetting system[0m

Children
No Data
Related