You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working with a very finicky SPI device attached to an stm32f4, and copy-paste-modified my way from drv/stm32h7-spi-server to an SPI server driver for the stm32f4. I couldn't get read() to work though, and based on the comments in the changes in #351, I'm wondering if there's a bug in stm32h7-spi-server's read implementation. It passes None as the tx buffer:
I tested fixing this with a quick hack by adding an "else send dummy data" branch to that block, and it makes read() work for me. I doubt that's the best fix, but wanted to open this issue for awareness (or correction if I'm misreading/misunderstanding).
The text was updated successfully, but these errors were encountered:
Interesting -- the intent with read is that it shifts out dummy data. I'm not sure it's currently being exercised on our side, though. The STM32H7 SPI driver state machine has gotten a little...hairy over the past year or so and I could totally believe that there's a bug here.
@jgallagher you're spot on here, btw. I have a fix prepared (which also greatly improves SPI performance) but it's currently traffic jammed behind a few other of my pending PRs.
I've been working with a very finicky SPI device attached to an stm32f4, and copy-paste-modified my way from
drv/stm32h7-spi-server
to an SPI server driver for the stm32f4. I couldn't getread()
to work though, and based on the comments in the changes in #351, I'm wondering if there's a bug instm32h7-spi-server
's read implementation. It passesNone
as the tx buffer:hubris/drv/stm32h7-spi-server/src/main.rs
Line 152 in 8e0b13b
which means
ready_writey
will never enter the block that transmits data (dummy or otherwise):hubris/drv/stm32h7-spi-server/src/main.rs
Lines 366 to 395 in 8e0b13b
I tested fixing this with a quick hack by adding an "else send dummy data" branch to that block, and it makes
read()
work for me. I doubt that's the best fix, but wanted to open this issue for awareness (or correction if I'm misreading/misunderstanding).The text was updated successfully, but these errors were encountered: