Recieve CAN BUS frames using Seeed CAN BUS Shield V2.0 & NRF52840DK

Hi everyone!!

Im very new to this firmware space and would love some help.

Currently I have a NRF52840 DK Board with a Seeed Canbus shield. (CAN-BUS Shield V2.0 | Seeed Studio Wiki)

This shield is very similar to the DFROBOT CanBus Shield. (Only changing the default pinout for the CS from D10 to D9).

I'm trying to send and receive can frames. for this I have the NRF52840DK (3.3v) board connected to the A side (3.3V) of level shifter TXS0108E and on the B side (5V) I connect the pins MISO, MOSI, SCK, CS and INT to the CAN BUS Shield 1 (5v). I connect this shield (1) to another arduino shield (2) (CAN H, CAN L) that is connected to the arduino.

The problem here is that I made tests sending messages from the NRF to the ARDUINO and it is sending the frame correctly, but when I want to make the reverse process, i mean, send the frames from the ARDUINO and receive them in the NRF I don't get the frame output in console. However, in the arduino it appears that the frame was sent and even the interrupt led and RX led of the shield (1) connected to the NRF light up. They're both working on normal mode and bitrate is set on 500kbps.

This is my arduino code:

#include <Arduino.h>
#include “mcp2515_can.h”

#define CAN_SS_PIN 10

mcp2515_can CAN(CAN_SS_PIN); // Configure CS -> 10 pin

void setup() {
    Serial.begin(115200);
    Serial.println(“----------------”);
    Serial.println(“Initializing”);

    // Initialize canbus to 500kps
    if (CAN_OK == CAN.begin(CAN_500KBPS)) {
        Serial.println(“CAN BUS Shield init ok!”);
    } else {
        Serial.println(“CAN BUS Shield init fail”);
        Serial.println(“Init CAN BUS Shield again”);
        delay(100);
        while (1);
    }

    // Configure the mcp2515 in normal mode (send frames to another device).
    if (CAN_OK == CAN.setMode(MODE_NORMAL)) {
        Serial.println(“MCP2515 in normal mode”);
    } else {
        Serial.println(“Error setting MCP2515 to normal mode”);
    }
}

void loop() {
    // Create a CAN frame
    unsigned char len = 8; // Data length (up to 8 bytes)
    unsigned char buf[8] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}; // Data of the frame
    unsigned long canId = 0x123; // Frame identifier (example)

    // Send the CAN frame
    if (CAN_OK == CAN.sendMsgBuf(canId, 0, len, buf)) { // Flags are omitted in this setup
        Serial.println(“Frame sent successfully”);
    } else {
        Serial.println(“Error sending frame”);
    }

    delay(4000); // Wait 4 seconds before sending the next frame.
}

And this is my NRF code:

/*
 * Copyright (c)
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <zephyr/drivers/can.h>
#include <zephyr/logging/log.h>

LOG_MODULE_REGISTER(main);

void rx_callback_function(const struct device *dev, struct can_frame *frame)
{
    LOG_INF("Received CAN frame\n");
    LOG_INF("ID: 0x%x\n", frame->id);
    LOG_INF("DLC: %d\n", frame->dlc);
    LOG_INF("Data: ");
    for (int i = 0; i < frame->dlc; i++) {
        LOG_INF("0x%x ", frame->data[i]);
    }
    LOG_INF("\n");
}



int main(void)
{
    LOG_INF("CanBus-OBD2 samplev11");
    int ret;
    k_sleep(K_MSEC(8000));

    const struct device *const can_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_canbus));

    LOG_INF("Asserting device ready.");
    if (!device_is_ready(can_dev)) {
        LOG_ERR("CAN: Device %s not ready.", can_dev->name);
        return 0;
    }
    LOG_INF("CAN: Device %s ready.", can_dev->name);

    LOG_INF("Enabling MODE NORMAL.");
    ret = can_set_mode(can_dev, CAN_MODE_NORMAL);
    if (ret != 0) {
        LOG_ERR("Error setting CAN mode [%d]", ret);
        return 0;
    }
    LOG_INF("MODE NORMAL Enabled.");

    LOG_INF("Trying to set bitrate.");
    ret = can_set_bitrate(can_dev, 500000);
    if (ret != 0) {
        LOG_ERR("Error setting CAN bitrate [%d]", ret);
        return 0;
    }
    LOG_INF("Set bitrate.");

    LOG_INF("Trying to start CAN.");
    ret = can_stop(can_dev);
    if (ret != 0) {
        LOG_ERR("Error stop CAN controller [%d]", ret);
        // return 0;
    }
    LOG_INF("CAN stopped [%d]", ret);

    LOG_INF("Trying to start can.");
    ret = can_start(can_dev);
    if (ret != 0) {
        LOG_ERR("Error starting CAN controller [%d]", ret);
        return 0;
    }
    LOG_INF("CAN started");

    while (1) {
        LOG_INF("Waiting...");
        k_sleep(K_MSEC(1000));
    }
}

in this code I didn't configure the filter for the ID since I want to receive any frame, anyway I tried configuring the id sent by the arduino but it does not show the “received” frame either.

This is the output I get in the Arduino

12:25:51.298 -> ----------------
12:25:51.337 -> Initializing
12:25:51.384 -> CAN BUS Shield init ok!
12:25:51.384 -> MCP2515 in normal mode
12:25:51.384 -> Frame sent successfully
12:25:55.372 -> Frame sent correctly
12:25:59.388 -> Frame successfully sent
12:26:03.360 -> Frame successfully sent
12:26:07.366 -> Error while sending the frame
12:26:11.409 -> Error while sending frame
12:26:15.422 -> Frame successfully sent
12:26:19.395 -> Frame successfully sent
12:26:23.390 -> Frame successfully sent
12:26:27.435 -> Frame successfully sent

This is the output I get in the NRF

[00:00:08.453,948] <inf> main: Asserting device ready.
[00:00:08.454,010] <inf> main: CAN: Device can@0 ready.
[00:00:08.454,010] <inf> main: Enabling MODE NORMAL.
[00:00:08.454,010] <inf> main: MODE NORMAL Enabled.
[00:00:08.454,010] <inf> main: Trying to set bitrate.
[00:00:08.454,345] <inf> main: Set bitrate.
[00:00:08.454,376] <inf> main: Trying to start can.
[00:00:08.454,589] <inf> main: CAN started
[00:00:08.454,589] <inf> main: Waiting...
[00:00:09.454,681] <inf> main: Waiting...
[00:00:10.454,864] <inf> main: Waiting...

I modified the dfrobot_can_bus_v2_0.overlay to make it work with my seeed shield. (changing the CS-GPIOS to 15 (D9) instead of 16 (D10). This is my overlay:

&arduino_spi {
    status = "okay";
    cs-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */

    mcp2515_dfrobot_can_bus_v2_0: can@0 {
        compatible = "microchip,mcp2515";
        spi-max-frequency = <1000000>;
        int-gpios = <&arduino_header 8 0x1>; /* D2 */
        status = "okay";
        reg = <0x0>;
        osc-freq = <16000000>;
        bus-speed = <125000>;
        sample-point = <875>;

        can-transceiver {
            max-bitrate = <1000000>;
        };
    };
};

/ {
    chosen {
        zephyr,canbus = &mcp2515_dfrobot_can_bus_v2_0;
    };
};

And just in case, this is mi prj.config on zephyr:

CONFIG_POLL=y
CONFIG_CAN=y
CONFIG_SPI=y
CONFIG_CAN_MCP2515=y
CONFIG_CAN_INIT_PRIORITY=80
CONFIG_CAN_MAX_FILTER=5

CONFIG_SHELL=y
CONFIG_CAN_SHELL=y
CONFIG_DEVICE_SHELL=y

CONFIG_GPIO=y
CONFIG_STATS=y
CONFIG_STATS_NAMES=y
CONFIG_STATS_SHELL=y
CONFIG_CAN_STATS=y

CONFIG_RTT_CONSOLE=n

CONFIG_LOG=y
CONFIG_CAN_LOG_LEVEL_DBG=y
CONFIG_SPI_LOG_LEVEL_DBG=n

CONFIG_PRINTK=y
CONFIG_CONSOLE=y

Additionally, I also tried this other different code to receive frames in the NRF but it didn't work either.

The code:

#include <zephyr/drivers/can.h>
#include <zephyr/logging/log.h>
#include <zephyr/kernel.h>

LOG_MODULE_REGISTER(main);

#define RX_THREAD_STACK_SIZE 1024
#define RX_THREAD_PRIORITY 5
#define RX_MSGQ_SIZE 10

K_THREAD_STACK_DEFINE(rx_thread_stack, RX_THREAD_STACK_SIZE);
struct k_thread rx_thread_data;
K_MSGQ_DEFINE(rx_msgq, sizeof(struct can_frame), RX_MSGQ_SIZE, 4);

struct can_buffer_state {
    uint32_t rx_frames;
    uint32_t dropped_frames;
};

struct can_buffer_state buffer_state = {0};

void rx_callback_function(const struct device *dev, struct can_frame *frame, void *user_data)
{
    LOG_INF("START RX CALLBACK");

    char *sender = (char *)user_data;

    LOG_INF("Received CAN frame - Sender: %s", sender);
    LOG_INF("ID: 0x%x, DLC: %d", frame->id, frame->dlc);
    LOG_HEXDUMP_INF(frame->data, frame->dlc, "Data: ");

    // Almacenar la trama recibida en la cola de mensajes
    if (k_msgq_put(&rx_msgq, frame, K_NO_WAIT) != 0) {
        LOG_WRN("Failed to store CAN frame in message queue.");
        buffer_state.dropped_frames++;
    } else {
        buffer_state.rx_frames++;
    }

    LOG_INF("END RX CALLBACK");
}

void rx_thread_entry(void *p1, void *p2, void *p3)
{
    ARG_UNUSED(p1);
    ARG_UNUSED(p2);
    ARG_UNUSED(p3);

    while (1) {
        // Esperar una trama en la cola de mensajes
        struct can_frame frame;
        k_msgq_get(&rx_msgq, &frame, K_FOREVER);

        // Manejar la trama recibida
        // Aquí puede realizar cualquier operación adicional con la trama recibida
        // Manejar la trama recibida
        LOG_INF("Received CAN frame2 - ID: 0x%x, DLC: %d", frame.id, frame.dlc);
        LOG_HEXDUMP_INF(frame.data, frame.dlc, "Data: ");
    }
}

void print_buffer_state(void)
{
    LOG_INF("Buffer state: %u frames received, %u frames dropped", buffer_state.rx_frames, buffer_state.dropped_frames);
}

int main(void)
{
    LOG_INF("CanBus-OBD2 samplev11");
    int ret;
    k_sleep(K_MSEC(8000));

    LOG_INF("-------------------------");

    LOG_INF("Initializing CAN bus");

    const struct device *const can_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_canbus));

    if (!can_dev) {
        LOG_ERR("CAN: Device not found.");
        return 0;
    }
    LOG_INF("CAN: Device %s ready.", can_dev->name);

    LOG_INF("-------------------------");

    LOG_INF("Enabling MODE NORMAL.");
    ret = can_set_mode(can_dev, CAN_MODE_NORMAL);
    if (ret != 0) {
        LOG_ERR("Error setting CAN mode [%d]", ret);
        return 0;
    }
    LOG_INF("MODE NORMAL Enabled.");

    LOG_INF("-------------------------");

    LOG_INF("Trying to set bitrate.");
    ret = can_set_bitrate(can_dev, 500000);
    if (ret != 0) {
        LOG_ERR("Error setting CAN bitrate [%d]", ret);
        return 0;
    }
    LOG_INF("Bitrate set.");

    LOG_INF("-------------------------");
    LOG_INF("Adding reception filter");

    const struct can_filter my_filter = {
        .flags = CAN_FILTER_DATA, .id = 0x123, .mask = CAN_STD_ID_MASK};
    int filter_id;

    char *callback_arg = "Callback argument";

    LOG_INF("Before adding reception filter.");
    filter_id = can_add_rx_filter(can_dev, rx_callback_function, callback_arg, &my_filter);
    if (filter_id >= 0) {
        LOG_INF("RX filter added successfully. Filter ID: %d", filter_id);
    } else {
        LOG_ERR("Failed to add RX filter. Error code: %d", filter_id);
    }
    LOG_INF("-------------------------");

    LOG_INF("Trying to start CAN.");

    ret = can_stop(can_dev);
    if (ret != 0) {
        LOG_ERR("Error stop CAN controller [%d]", ret);
        // return 0;
    }
    LOG_INF("CAN stopped [%d]", ret);

    ret = can_start(can_dev);
    if (ret != 0) {
        LOG_ERR("Error starting CAN controller [%d]", ret);
        return 0;
    }
    LOG_INF("CAN started");

    LOG_INF("-------------------------");

    // Crear y lanzar el thread de recepción
    k_thread_create(&rx_thread_data, rx_thread_stack, K_THREAD_STACK_SIZEOF(rx_thread_stack),
                    rx_thread_entry, NULL, NULL, NULL, RX_THREAD_PRIORITY, 0, K_NO_WAIT);

    // Ejecutar un bucle infinito para imprimir el estado del buffer
    while (1) {
        LOG_INF("-----------------------");
        print_buffer_state();
        k_sleep(K_SECONDS(5)); // Intervalo de actualización del estado del buffer
    }

    return 0;
}

Output:

[00:00:00.457,672] <inf> main: CanBus-OBD2 samplev11
--- 62 messages dropped ---
[00:00:08.457,733] <inf> main: -------------------------
[00:00:08.459,777] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/0
[00:00:08.459,808] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0/0
[00:00:08.459,838] <dbg> spi_nrfx_spim: finish_transaction: Transaction finished with status 0
[00:00:08.459,899] <dbg> spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20003698 - rx_bufs 0x200036a0 - 1
[00:00:08.459,899] <dbg> spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x200036b8 (2), current_rx 0x20003700 (2), tx buf/len 0x20003694/1, rx buf/len 0/1
[00:00:08.459,960] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/13
[00:00:08.459,991] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x200036a8/13
[00:00:08.460,144] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/0
[00:00:08.460,174] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0/0
[00:00:08.460,174] <dbg> spi_nrfx_spim: finish_transaction: Transaction finished with status 0
[00:00:08.460,235] <dbg> spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20003698 - rx_bufs 0x200036a0 - 1
[00:00:08.460,266] <dbg> spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x200036b8 (2), current_rx 0x20003700 (2), tx buf/len 0x20003694/1, rx buf/len 0/1
[00:00:08.460,327] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/13
[00:00:08.460,357] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x200036a8/13
[00:00:08.460,479] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/0
[00:00:08.460,510] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0/0
[00:00:08.460,540] <dbg> spi_nrfx_spim: finish_transaction: Transaction finished with status 0
[00:00:08.460,601] <dbg> spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20003730 - rx_bufs 0x20003738 - 1
[00:00:08.460,632] <dbg> spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x20003740 (2), current_rx 0x20003750 (2), tx buf/len 0x2000372c/2, rx buf/len 0/2
[00:00:08.460,693] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/1
[00:00:08.460,723] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x2000377a/1
[00:00:08.460,754] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/0
[00:00:08.460,784] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0/0
[00:00:08.460,815] <dbg> spi_nrfx_spim: finish_transaction: Transaction finished with status 0
[00:00:10.426,330] <dbg> spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20003730 - rx_bufs 0x20003738 - 1
[00:00:10.426,361] <dbg> spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x20003740 (2), current_rx 0x20003750 (2), tx buf/len 0x2000372c/2, rx buf/len 0/2
[00:00:10.426,422] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/1
[00:00:10.426,422] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x2000377a/1
[00:00:10.426,483] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/0
[00:00:10.426,483] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0/0
[00:00:10.426,513] <dbg> spi_nrfx_spim: finish_transaction: Transaction finished with status 0
[00:00:10.426,544] <dbg> spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20003698 - rx_bufs 0x200036a0 - 1
[00:00:10.426,574] <dbg> spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x200036b8 (2), current_rx 0x20003700 (2), tx buf/len 0x20003694/1, rx buf/len 0/1
[00:00:10.426,635] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/13
[00:00:10.426,635] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x200036a8/13
[00:00:10.426,788] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/0
[00:00:10.426,788] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0/0
[00:00:10.426,818] <dbg> spi_nrfx_spim: finish_transaction: Transaction finished with status 0
[00:00:10.426,879] <dbg> spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20003730 - rx_bufs 0x20003738 - 1
[00:00:10.426,879] <dbg> spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x20003740 (2), current_rx 0x20003750 (2), tx buf/len 0x2000372c/2, rx buf/len 0/2
[00:00:10.426,940] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/1
[00:00:10.426,971] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x2000377a/1
[00:00:10.427,001] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/0
[00:00:10.427,032] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0/0
[00:00:10.427,032] <dbg> spi_nrfx_spim: finish_transaction: Transaction finished with status 0
[00:00:13.459,533] <inf> main: -----------------------
[00:00:13.459,564] <inf> main: Buffer state: 0 frames received, 0 frames dropped
[00:00:14.431,976] <dbg> spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20003730 - rx_bufs 0x20003738 - 1
[00:00:14.431,976] <dbg> spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x20003740 (2), current_rx 0x20003750 (2), tx buf/len 0x2000372c/2, rx buf/len 0/2
[00:00:14.432,037] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/1
[00:00:14.432,037] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x2000377a/1
[00:00:14.432,098] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/0
[00:00:14.432,098] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0/0
[00:00:14.432,128] <dbg> spi_nrfx_spim: finish_transaction: Transaction finished with status 0
[00:00:14.432,159] <dbg> spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20003698 - rx_bufs 0x200036a0 - 1
[00:00:14.432,189] <dbg> spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x200036b8 (2), current_rx 0x20003700 (2), tx buf/len 0x20003694/1, rx buf/len 0/1
[00:00:14.432,250] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/13
[00:00:14.432,281] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x200036a8/13
[00:00:14.432,403] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/0
[00:00:14.432,434] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0/0
[00:00:14.432,434] <dbg> spi_nrfx_spim: finish_transaction: Transaction finished with status 0
[00:00:14.432,495] <dbg> spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20003730 - rx_bufs 0x20003738 - 1
[00:00:14.432,495] <dbg> spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x20003740 (2), current_rx 0x20003750 (2), tx buf/len 0x2000372c/2, rx buf/len 0/2
[00:00:14.432,556] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/1
[00:00:14.432,586] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x2000377a/1
[00:00:14.432,617] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/0
[00:00:14.432,647] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0/0
[00:00:14.432,647] <dbg> spi_nrfx_spim: finish_transaction: Transaction finished with status 0
[00:00:18.437,622] <dbg> spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20003730 - rx_bufs 0x20003738 - 1
[00:00:18.437,622] <dbg> spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x20003740 (2), current_rx 0x20003750 (2), tx buf/len 0x2000372c/2, rx buf/len 0/2
[00:00:18.437,683] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/1
[00:00:18.437,713] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x2000377a/1
[00:00:18.437,744] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/0
[00:00:18.437,744] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0/0
[00:00:18.437,774] <dbg> spi_nrfx_spim: finish_transaction: Transaction finished with status 0
[00:00:18.437,805] <dbg> spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20003698 - rx_bufs 0x200036a0 - 1
[00:00:18.437,835] <dbg> spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x200036b8 (2), current_rx 0x20003700 (2), tx buf/len 0x20003694/1, rx buf/len 0/1
[00:00:18.437,896] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/13
[00:00:18.437,896] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x200036a8/13
[00:00:18.438,049] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/0
[00:00:18.438,049] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0/0
[00:00:18.438,079] <dbg> spi_nrfx_spim: finish_transaction: Transaction finished with status 0
[00:00:18.438,140] <dbg> spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20003730 - rx_bufs 0x20003738 - 1
[00:00:18.438,140] <dbg> spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x20003740 (2), current_rx 0x20003750 (2), tx buf/len 0x2000372c/2, rx buf/len 0/2
[00:00:18.438,201] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/1
[00:00:18.438,201] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x2000377a/1
[00:00:18.438,262] <dbg> spi_nrfx_spim: spi_context_update_tx: tx buf/len 0/0
[00:00:18.438,262] <dbg> spi_nrfx_spim: spi_context_update_rx: rx buf/len 0/0
[00:00:18.438,293] <dbg> spi_nrfx_spim: finish_transaction: Transaction finished with status 0
[00:00:18.459,625] <inf> main: -----------------------
[00:00:18.459,625] <inf> main: Buffer state: 0 frames received, 0 frames dropped

Any ideas? I would be very grateful if one of you have done this before or have any advice :)

Related