2018-01-03 05:35 AM
uint8_t *pSRAM = (uint8_t*)SRAM2_BASE;
HAL_UART_Receive_DMA(&huart2,pSRAM ,25
); // uses DMA1This 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-normal2018-01-03 05:44 AM
Which mcu?
What is the value of SRAM2_BASE?
JW
2018-01-03 06:48 AM
,
,
STM32F446RE
♯ define SRAM1_BASE 0x20000000U /*!<, SRAM1(112 KB) base address in the alias region */
,
♯ define SRAM2_BASE 0x2001C000U /*!<, SRAM2018-01-03 07:09 AM
Ok, the problem is keil's memory window not showing bytes coming in . ! when i verified contents of pointer its indeed having bytes what i sent over uart. but why keil does not display SRAM2 contents ??
2018-01-03 07:14 AM
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