-
Notifications
You must be signed in to change notification settings - Fork 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
drivers: dma: stm32: bdma support for H7 #53184
Conversation
90557df
to
af2d1ba
Compare
This functionality is currently being verified using
__in_section(shared_sram4, adc3,
dma_ds) static int16_t buffer[ARRAY_SIZE(adc_channels)] __aligned(32);
|
07bbcdb
to
0feabb8
Compare
Do you also have tests/drivers/dma/loop_transfer and tests/drivers/dma/chan_blen_transfer PASSED with bdma on any stm32h7 board ? |
@FRASTM not yet, wasn't sure about them. I will add tests to a seperate commit in this PR as well. Thanks! |
65576bd
to
c2633ee
Compare
Tested, and both tests run successfully. However, both already have an DMA test for the |
7e1ae7e
to
d2a31b8
Compare
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.
all DMA regression tested on NXP FRDM_K64F platfrom. no issues found
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.
Some last comments.
Also, my request about splitting commits impacting dmamux still stands
@@ -16,3 +16,12 @@ SECTION_DATA_PROLOGUE(eth_stm32,(NOLOAD),) | |||
} GROUP_DATA_LINK_IN(LINKER_DT_NODE_REGION_NAME(DT_NODELABEL(sram3)), LINKER_DT_NODE_REGION_NAME(DT_NODELABEL(sram3))) | |||
|
|||
#endif | |||
|
|||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(sram4), okay) | |||
SECTION_PROLOGUE (sram4, ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(sram4))) (NOLOAD),) |
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.
When adding the section for the SRAM4 to map BDMA buffers, are the clock and power already present to supply the D3 domain ?
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.
Not sure what you mean? Adding this linker section will not change the order in SRAM sections or this driver is initialized. And the first time the BDMA knows about SRAM4 is during INIT_LEVEL_APPLICATION
, and by then everything is obviously started up as expected.
546b415
to
2e1176f
Compare
Implement STM32H7 BDMA driver. Co-authored-by: Jeroen van Dooren <jeroen.van.dooren@nobleo.nl> Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
c4ac5d0
to
7875ce8
Compare
Wrap calls to DMA drivers through fops to allow different dmamuxes to point to different types of dma with different function calls. In preperation to add support for BDMA and DMAMUX2. Co-authored-by: Jeroen van Dooren <jeroen.van.dooren@nobleo.nl> Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
7875ce8
to
9a12272
Compare
Extends dmamux driver to support DMAMUX 2, which supports the BDMA on STM32H7 devices. Co-authored-by: Jeroen van Dooren <jeroen.van.dooren@nobleo.nl> Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
The dma-requests specified for dmamux is changed to the correct number of 107. This can be found in the Reference Manual RM0455 Section 17.1. Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
Some devices contain multiple dmas which requires multiple tests Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
Add DMA unit tests for BDMA driver. Also requires adding additional kconfig options to allocate the memory buffers in a specific SRAM section, because the BDMA only has access to SRAM4. Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
Some devices contain multiple dmas which requires multiple tests Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
Add unit tests for BDMA driver. Also requires adding additional kconfig options to allocate the memory buffers in a specific SRAM section, because the BDMA only has access to SRAM4. Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
9a12272
to
be01753
Compare
In zephyrproject-rtos#53184 a linker section for SRAM4 was added because it's required for use with the STM32H7 BDMA. Now in zephyrproject-rtos#52965 support was added for the ADC DMA which expects a similar linker section which is non-cachable, but is limited to use SRAM4 to place it's buffers. This commit gives the user more flexibility to use any SRAM region to place buffers to use with ADC DMA. The region SRAM0 isn't supported because it doesn't have the "zephyr,memory-region" compatibility required to turn it into a non-cacheable region, meaning it doesn't fit the mentioned use case. Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
Implement STM32H7 BDMA driver and integrate into dmamux
Co-authored-by: Jeroen van Dooren jeroen.van.dooren@nobleo.nl
Signed-off-by: Hein Wessels heinwessels93@gmail.com