-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spurious CS high when using SPI enable_chip_select_0 #111
Comments
Thanks for the detailed report! These observations are consistent with how I've seen this SPI peripheral manage the chip select pin. Since the CS pin is fully managed by the hardware, changing the behavior requires us to study the reference manual, and understand what settings are available. It's definitely an Besides driving CS manually, there might be two other options:
|
This should be resolved in imxrt-hal v0.5. The LPSPI driver now uses continuous transfers for blocking The images below (click to expand) show logic analyzer recordings of the Line 65 in 4bee950
where |
Excellent! Thanks! |
I've been debugging an SPI problem for the last week, and in the end I ended up buying a logic analyzer to hunt the problem down.
The problem seems to stem from using
enable_chip_select_0
instead of taking control over the CS myself.I apologize in advance if the problem isn't in imxrt-hal, I've tried to follow the code, but I don't quite get how this specific feature works.
The code in question is this:
Recording this with the logic analyzer I get this:
Notice how the white CS goes to high in between word 1 and word 2. I believe this not correct and the chip I'm working with (an IO-expander MCP23S17), does not like it at all.
The workaround is to take control over the CS myself, so quite easily solved once I saw the problem, but I wonder whether the behavior of
method.enable_chip_select_0
can be fixed?The text was updated successfully, but these errors were encountered: