Replies: 7 comments 2 replies
-
Now unfortunately the compile doesn't work :-( I think there can't be much missing? nucleo_h533re.overlay&spi1 { prj.confCONFIG_GPIO=y CONFIG_SPI=y main.c#include <stdio.h> int main(void)
} ERRORC:/Projekte/SPI/Appl/src/main.c: In function 'main': |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I just did simple communication via SPI in Nucleo F446RE board, I had similar errors, we can check my code to fix yours main.c#include <zephyr/kernel.h> LOG_MODULE_REGISTER(spi_test, LOG_LEVEL_DBG); #define SPI_DEVICE_NODE DT_NODELABEL(spi2) static const struct device *spi_dev = DEVICE_DT_GET(SPI_DEVICE_NODE); int main( void )
} nucleo_f446re.overlay&spi2 {
}; prj.confCONFIG_SPI=y |
Beta Was this translation helpful? Give feedback.
-
I think I have found the problem, ash on my head! In my build call the prj.conf was bent, so the entries for the SPI were missing. Sorry for that! |
Beta Was this translation helpful? Give feedback.
-
Oh man, I didn't think this would be so difficult, I've made some progress, but no data is coming out of the SPI yet. I have now looked at the spi_bitbang and translated it, it crashes on the first send attempt. I still think it is due to the overlay file. Here is the error message of the serial terminal [00:00:00.000,000] os: ***** BUS FAULT ***** This is caused by the call int ret = spi_write(dev, &config, &tx_bufs); prj.conf CONFIG_SPI=y CONFIG_STDOUT_CONSOLE=y overlay &spi1 { |
Beta Was this translation helpful? Give feedback.
-
@higginsa1 What do you mean by that? what are you trying to do exactly? See https://docs.zephyrproject.org/latest/doxygen/html/group__spi__interface.html |
Beta Was this translation helpful? Give feedback.
-
I took the Bitbang SPI example and merged the proj.conf with mine. I used my overlay file and replaced the node from the example with my spi1. I tried this with the interrupt, but unfortunately this also crashed. Note: Unfortunately I don't have a slave connected at home, can it crash because of that? I would have said a clock and CS I would have to see at least once before it detects an error? proj.conf CONFIG_SPI=y CONFIG_STDOUT_CONSOLE=y overlay ERROR |
Beta Was this translation helpful? Give feedback.
-
Hello, I am unfortunately a beginner in terms of Zephyr, installation compiling works, all no problem, but now I just wanted to configure the SPI as master. Here I break my neck.
I have already looked at many examples, but either the device tree can no longer be compiled or the SPI ends with an error.
Does anyone have a tip for me? Surely a piece of cake for an experienced user?
How do I create a devicetree where I can configure the pins for CS, MOSI, MISO and Clock?
Beta Was this translation helpful? Give feedback.
All reactions