Skip to main content
n.serina
Associate III
January 3, 2018
Question

UART can not DMA TO SRAM2 ?

  • January 3, 2018
  • 1 reply
  • 781 views
Posted on January 03, 2018 at 14:35

uint8_t *pSRAM = (uint8_t*)SRAM2_BASE;

HAL_UART_Receive_DMA(&huart2,

pSRAM ,25

); // uses DMA1

This code Does not put byte on SRAM2 when UART2 receives data. 

but below works 

uint8_t *pSRAM = (uint8_t*)SRAM1_BASE;

HAL_UART_Receive_DMA(&huart2,pSRAM );

When i debug the code , KEIL memory window shows bytes coming in SRAM1_BASE but not in SRAM2_BASE. 

#stm32-f4 #kit-stm32f4-discovery #dma-normal
This topic has been closed for replies.

1 reply

waclawek.jan
Super User
January 3, 2018
Posted on January 03, 2018 at 14:44

Which mcu?

What is the value of SRAM2_BASE?

JW

n.serina
n.serinaAuthor
Associate III
January 3, 2018
Posted on January 03, 2018 at 14:48

 ,

 ,

STM32F446RE

♯ define SRAM1_BASE 0x20000000U /*!<, SRAM1(112 KB) base address in the alias region */

 ,

♯ define SRAM2_BASE 0x2001C000U /*!<, SRAM
waclawek.jan
Super User
January 3, 2018
Posted on January 03, 2018 at 15:14

I do use DMA1 into SRAM2 on an STM32F446RE, and it works for me.

I don't use Cube, though.

Read out and post the relevant DMA registers (including status).

JW