Replies: 8 comments 20 replies
-
Beta Was this translation helpful? Give feedback.
-
Hi @Huibean, in your STM32 Cube application , are you using SPI with/without DMA, with/without DMA/SPI IT? |
Beta Was this translation helpful? Give feedback.
-
Without DMA and Interupt
Abderrahmane ***@***.***>于2024年6月12日 周三17:07写道:
… Hi @Huibean <https://github.com/Huibean>, in your STM32 Cube application
, are you using SPI with/without DMA, with/without DMA/SPI IT?
—
Reply to this email directly, view it on GitHub
<#73930 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACY7IIKBVCB2PC54EQJRT6DZHAFVHAVCNFSM6AAAAABI63GHMGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TONBZGE4TM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
I observed similar behaviour. Long delay between bytes when using SPI. It was also with STM32, but I don't know if this is specific to the STM32 devices. I also tried with the Arduino IDE as a comparison, and while it was not without delay, the delay was only 300ns (instead of around 1-2 us in Zephyr). I think this deserves some attention, as SPI is pretty important peripheral. |
Beta Was this translation helpful? Give feedback.
-
This should theoretically be tackled by RTIO API implementation. See #46658 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Any updates on this? Sorry, I don't really have a complete answer other than I can say that I have seen these same delays. Note: I am using the Arduino setup for zephyr (ArduinoCore-zephyr), Currently I am experimenting with a sketch that reads in from a GC2145 camera and tries to display it on an ST7796 display (480x320) I have not included all of the code here, but the main part that outs all of the pixels looks like:
The code was initialized to use SPI speed of 16mhz... Today I hacked up my ST77XX code to try to output it using DMA.
With using this instead with a callback, the time it takes to output 1 frame The gap between words (16 bits each) went from about 5.76us to about 900ns. not sure if it would help, but the Sketch looks like:
When I first tried using the spi_transceive_cb, in order to make it work, I know I had to enable some stuff in the .conf file.
I am not sure if I added the first two, but I know I needed the last 2 to make it work. Hope that helps |
Beta Was this translation helpful? Give feedback.
-
@Huibean, did you try enabling |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
when porting a application from cubemx to zephyr, the spi sensor always not recognize the command sent from host, while in cubexmx is working, using the logic anlayize to record the data in SPI bus, the data is the same, but in zephyr there is about 2us betweent bytes, so I create a new baisc spi example project to test it and confirm this issue is not comming from other code, test is on stm32h743zi-nucleo without changes only, I have also test on a F411 board, the issue is the same, zephyr version is 3.6.0, SDK version 0.16.6
in .prj
test code
Beta Was this translation helpful? Give feedback.
All reactions