-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
tests: dma: chan_blen_transfer: test breaks if DMA cannot access flash #75125
Comments
Please send a patch with the const qualifier removed since you've already done the work and tested it. There's still going to be some part that fails at some point though because not all RAM is equal for all DMAs and SoCs. We should use instead dts defined memory attributes and buffer placement at some point https://docs.zephyrproject.org/latest/services/mem_mgmt/index.html#memory-attributes to provide correct static buffer placements (e.g. place the buffer in a region that is useable by DMA). |
This commit removes the const qualifier from TX (source) buffer of the chan_blen_transfer DMA test to ensure it gets placed in RAM rather than flash. This ensures the test can pass on hardware where the DMA controller is unable to access flash. Fixes zephyrproject-rtos#75125. Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR open: #75245 |
This commit removes the const qualifier from TX (source) buffer of the chan_blen_transfer DMA test to ensure it gets placed in RAM rather than flash. This ensures the test can pass on hardware where the DMA controller is unable to access flash. Fixes #75125. Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
This commit removes the const qualifier from TX (source) buffer of the chan_blen_transfer DMA test to ensure it gets placed in RAM rather than flash. This ensures the test can pass on hardware where the DMA controller is unable to access flash. Fixes zephyrproject-rtos#75125. Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Describe the bug
In
tests/drivers/dma/chan_blen_transfer
, thetx_data
buffer is declaredconst
:zephyr/tests/drivers/dma/chan_blen_transfer/src/test_dma.c
Line 25 in b82b5b0
As a result, this buffer is placed in
.rodata
and ends up in FLASH region. This causes the test to fail on SoCs equipped with a DMA controller that cannot access flash memory, such as STM32WB09 MCUs.Expected behavior
Test should succeed on SoCs with a DMA as long as it can perform memory -> memory (i.e., RAM -> RAM) transfers, regardless of flash -> memory transfer capabilities.
A possible fix is to remove the
const
qualifier ontx_data
- without the qualifier, the buffer seems to be placed in RAM, and the test succeeds.Logs and console output
Test log:
Test log, after removing the
const
storage qualifier oftx_data
:The text was updated successfully, but these errors were encountered: