1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <zephyr/kernel.h>
#include <zephyr/drivers/spi.h>
#include <stdio.h>
#include <string.h>
#include <nrfx.h>
#include <nrfx_spim.h>
#include <nrfx_gpiote.h>
#include <nrfx_dppi.h>
/* Define your SPI frequency and timing parameters */
#define SPI_FREQUENCY 26000000 // 26 MHz
#define COMMAND_RATE 10000 // Desired command rate: 10 kHz
/* Define your SPI command and data variables */
#define COMMAND_SIZE 32 // Command size: 32 bits
#define CONVERSION_COMMAND 0x12345678 // Example conversion command
I am able to build and flash to my board but the issue comes during debugging. I get a code of -22 after calling spi_transceive and I notice that my spi_dev is optimized out. I am a beginner when it comes to Nordic boards and this software is very new to me as well. I don't know how much I need to do in terms of SPI setup using zephyr as from what I can tell everything else is fine except for these things. Let me know if there are any resources that could help as well.