Zephyr BLE stack and SPIM signals interference

Hello,

I'm having some problems when I want to use some pins as SPIM interface (nrfx driver) and the Zephyr BLE stack is included in the project:

Platform: nRF5340-DK

The project consist of a SPIM interface connected to a sensor controlled by the application core.

Test 1: SPIM interface only
CS: P1.5
SCK: P1.4
MOSI: P1.1
MISO: P1.0

Transfer OK

Test 2: SPIM interface + Zephyr BLE peripheral (even without initializing it)
CS: P1.5
SCK: P1.4
MOSI: P1.1
MISO: P1.0

CS and SCK OK
MOSI doesn't work (state '1' during transfer)

Test 3: SPIM interface + Zephyr BLE peripheral (even without initializing it)

CS: P1.5
SCK: P1.4
MOSI: P1.9
MISO: P1.0

CS and SCK OK
MOSI works as expected.
SPIM receives all '0'

Test 4: SPIM interface + Zephyr BLE peripheral (even without initializing it)

CS: P1.5
SCK: P1.4
MOSI: P1.9
MISO: P1.7

CS and SCK OK
MOSI works as expected.
SPIM receives sensor data as expected 

It would appear that pins 1.0 and 1.1 are being used by BLE stack. Same happened for others pins (0.11 for example)
Is this true or did I miss something?

Thanks

P.S.: Similar post

Parents Reply Children
  • Hello Kenneth,

    You're right.
    These pins are used for the UART1 of network core to communicate with the interface MCU in the nRF5340-DK.

    After commenting these lines in the file "nrf5340_cpuapp_common.dtsi", everything started to work.

        gpio_fwd: nrf-gpio-forwarder {
            compatible = "nordic,nrf-gpio-forwarder";
            status = "okay";
            uart {
                gpios = <&gpio1 1 0>, <&gpio1 0 0>, <&gpio0 11 0>, <&gpio0 10 0>;
            };
        };
    Thank you!
    Pablo
Related