Replies: 2 comments 5 replies
-
In general you should be using the Zephyr API as much as possible. This is the most portable and simplified interface provided. You certainly can use the Nordic HAL directly, but it complicates interaction with Zephyr. To configure your device as a SPI slave, you will need to likely modify the board's devicetree and set Kconfigs for your project to enable this functionality. I believe the default role with SPI is usually master. |
Beta Was this translation helpful? Give feedback.
-
Do you have a scope capture from this? My initial guesses on improvements would be increasing the clock frequency, and decreasing the setup time between toggling the CS line and beginning the clock. Without a capture of some sort though, this would be hard to diagnose. Additionally since SPI is master-initiated this will be introducing some latency, again the capture would help diagnose. If possible setting a GPIO and capturing it just before the transaction begins would help pinpoint how much latency is involved. |
Beta Was this translation helpful? Give feedback.
-
Recently I want to add zephyr os to my nrf52840
I encountered a problem when using nrf52840 spi slave
In nrf52840, nrf_drv_spis_buffers_set(), I think it is to set (or define) spis to put the data to be sent or received in the tx/rx buffer
The spis setting (or definition) part of zephyr is not very clear
Refer to other people's writing methods, they will call spi_transceive() when they want to send or receive data
What I want to discuss is whether these two functions, spi_transceive() and nrf_drv_spis_buffers_set() do similar things? What is the difference between them?
zephyr version 2.4.99
Beta Was this translation helpful? Give feedback.
All reactions