HAL_UART_Transmit_DMA(), only works with inline defined string and fails with globaly defined array
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-09 3:24 AM
why does this work:
HAL_UART_Transmit_DMA(&huart6, (uint8_t *)"stm32\n", 6); // works and sends data
and this doesnt:
ALIGN_32BYTES (uint8_t aTxBuffer[]) = "stm32\n";
HAL_UART_Transmit_DMA(&huart6, (uint8_t *)aTxBuffer, 6) // doesnt send any data
what am i missing?
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-09 4:36 AM
solved! appreciate the quick responses, thank you!
for anyone whose reading this and having the same issue: this is what you're looking for https://community.st.com/s/article/FAQ-DMA-is-not-working-on-STM32H7-devices
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-09 3:49 AM
Most likely aTxBuffer is located in DTCM, to which only the MDMA has access in H7 series. Take a look at AN4891 figure 1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-09 3:51 AM
DMA buffers must be located in (the appropriate) RAM. Fixed strings or other constant data are usually stored in ROM (flash).
You should verify/ensure that the data is provided on stack / RAM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-09 4:36 AM
solved! appreciate the quick responses, thank you!
for anyone whose reading this and having the same issue: this is what you're looking for https://community.st.com/s/article/FAQ-DMA-is-not-working-on-STM32H7-devices
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-24 5:30 AM
Glad to know that your question is answered. Please mark the article as helpful in this case.
Thanks
Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
