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
If CS is asserted between transfers then consider bus to be busy for all but owning device #12604
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
AUTOMERGE: (FAIL)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on MAMBAG4 which has a shared SPI bus for flash and OSD
before: OSD locks up and blackbox stops working
after: OSD works perfect, blackbox logs as expected
edit://
its not fixed, i dont know why it worked once here
edit2://
DMA resource mapping must be done manual, if BUS is shared! So i can declare this as tested on 2 G4 boards.
…all but owning device
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SteveCEvans is this ready to merge?
EDIT - SPI DMA: If bus is shared we need to assign manual:
#define SPI_RX_DMA_OPT 6
#define SPI_TX_DMA_OPT 7
#define SPI_RX_DMA_OPT 8
#define SPI_TX_DMA_OPT 9
I need to fix an issue with the MAMBAG4 build to complete testing. |
These definitions are meaningless. |
@SteveCEvans I got those lines from @freasy .
Updated in config repo. |
@haslinghuis copied wrong 😅 |
Do you want to test this code? Here you have an automated build: |
…all but owning device (betaflight#12604) * If CS is asserted between transfers then consider bus to be busy for all but owning device * Track if MAX7456 is mid DMA transfer, not simply that the SPI bus is busy * Enable SPI DMA TX/RX together
…usy for … (#12784) If CS is asserted between transfers then consider bus to be busy for all but owning device (#12604) * If CS is asserted between transfers then consider bus to be busy for all but owning device * Track if MAX7456 is mid DMA transfer, not simply that the SPI bus is busy * Enable SPI DMA TX/RX together Co-authored-by: Steve Evans <SteveCEvans@users.noreply.github.com>
…all but owning device (betaflight#12604) * If CS is asserted between transfers then consider bus to be busy for all but owning device * Track if MAX7456 is mid DMA transfer, not simply that the SPI bus is busy * Enable SPI DMA TX/RX together
#define SPI1_RX_DMA_OPT 6 not working for speedybee f405 v3 edit |
…all but owning device (betaflight#12604) * If CS is asserted between transfers then consider bus to be busy for all but owning device * Track if MAX7456 is mid DMA transfer, not simply that the SPI bus is busy * Enable SPI DMA TX/RX together
May fix #12583.
This PR checks if CS is asserted between transfers and then consider the SPI bus to be busy for all but the device which asserted CS.