-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
boards: add centralized DMA map and enable SPI DMA on more boards #14207
Conversation
10e7041
to
ef84b7f
Compare
Something like this (?):
|
That's certainly better as documentation. I was trying to find a line in between where we could handle the actual NuttX defines in order. // DMA2 Channel/Stream Selections
//--------------------------------------------//---------------------------//----------------
#define DMACHAN_SPI1_RX DMAMAP_SPI1_RX_1 // DMA2, Stream 0, Channel 3 (SPI sensors RX)
#define DMAMAP_USART6_RX DMAMAP_USART6_RX_1 // DMA2, Stream 1, Channel 4
#define DMAMAP_USART1_RX DMAMAP_USART1_RX_1 // DMA2, Stream 2, Channel 4
#define DMACHAN_SPI1_TX DMAMAP_SPI1_TX_1 // DMA2, Stream 3, Channel 3 (SPI sensors TX)
// AVAILABLE // DMA2, Stream 4
// DMAMAP_TIM1_UP // DMA2, Stream 5, Channel 6 (DSHOT)
#define DMAMAP_SDIO DMAMAP_SDIO_2 // DMA2, Stream 6, Channel 4 I suppose we could just do both. The full table with usage followed by a simpler list of defines in stream order. |
Let's do both then. I added the tables in the last commit, if you want I can amend it to the individual board commits. |
Thanks @bkueng. No, let's just keep going and finally get this in. |
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.
The format of this is super for readability and DMA system usage overview!
The part I think that will need work (here in or the next PR) is the allocation sizes needed by the drivers. We may need to make this more dynamic and position RAM based on platform.
We also need to catch allocation failures.
Has this been bench tested on all HW?
65995d0
to
2337221
Compare
I've backed out the change that removed the DMA capable check. Let's get this in and keep working towards an acceptable solution for stm32f7 and stm32h7. |
- synced with px4_fmu-v4
2337221
to
feaa576
Compare
@dagar I am sorry it took so long to get this done! I am surprised by how little the DMA overhead really is!
|
@dagar also for the 20 Mhz the actual frequency is 13.5 Mhz |
Let's give this another try. These headers seem a bit archaic compared to something with actual structure, but it seems workable for now until we're ready to jump into code generation.
Requires PX4/NuttX#85 for STM32F7.