RED HAT
DIIDevHeads IoT Integration Server
•Created by Dtynin on 7/2/2024 in #middleware-and-os
Resolving 'SPI Device Not Ready' Error on AVR Microcontroller with Zephyr RTOS
Hey @Dtynin , it sounds like you've made good progress with your setup. The error you're encountering, "SPI device not ready," typically indicates that the SPI device isn't being initialized properly or isn't ready when your application tries to access it. you should Ensure that the device tree entry for your
SPI controller (spi@... node)
in your .dts
file is correctly configured and verify the compatible property matches the SPI driver you're using and that the SPI pins (sck, mosi, miso, cs-gpios)
are correctly assigned and configured, check your SPI configuration in the prj.conf
file and Ensure the SPI bus number, frequency, and other settings (SPI_WORD_SET, SPI_TRANSFER_MSB)
match the hardware requirements of your MCP9808
sensor, and verify that the Zephyr SPI driver (drivers/spi.h)
supports the configuration parameters you've set (spi_cfg)
. Sometimes, mismatches in configuration can lead to initialization failures.9 replies