SPI Transfer Function Calls (and using DMA) #1102
thestumbler
started this conversation in
General
Replies: 1 comment
-
That's puzzling. If you subsequently call multiple configuration functions in the BMI088 driver this will also run multiple transactions back to back. There must be something else that is different. Are you using the driver with DMA? Just that I know which one to try to reproduce the issue with. Could you try subsequent RX + TX transactions? Maybe there is some issue only occurring with RX only transfers. Those aren't done in the BMI088 driver and an issue could have been missed during testing of the H7 SPI driver. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So the SPI functions that I'm using in the H723 processor, based on the recent BMI088 example code, work just fine. But I was trying an experiment where I performed two separate SPI transfer calls, back to back, instead is just one. My first attempt didn't work. Not only did I not receive back the correct data (this was a read operation) but I don't even see the correct number of bytes being clocked in. (The first call was sending a 3-byte command + address to my SPI device, and the second call was to read data).
Why am I messing up a working interface? Well, everything works great talking to my W5100S's banks of registers. The technique of the device class owning two small buffers like the BMI chip also works great for me. But when I start sending bigger chunks of memory to the W5100S's buffer area, it's possible that some transfers could be much bigger. Say 1KB or so. If I pass in the buffers as arguments, then the device class doesn't have to maintain duplicate buffers and copy to/from the application's buffer. That's why I tried to split the SPI transfer into two calls.
If truly one call only is needed, then my application can just deal with (ignore) the 3-byte prefix. For now I'll just live with duplicate buffers and copying.
But when I go to
Beta Was this translation helpful? Give feedback.
All reactions