Aquí estoy tratando de mover los datos del SRAM
location 0x20000010
al registro ODR
del GPIOE
de STM32f303
. Pero no me está sucediendo (no veo el cambio de datos en la ODR mientras se realiza la depuración). No entiendo por qué. ¿Puede alguien ayudarme en esto?
EDIT
int SRAM_ADDRESS __attribute__((section(".ARM.__at_0x20000010")));
volatile Task_S_T *Task;
Task = LCD_FIFO_Peek();
SRAM_ADDRESS = Task->Data;
//initialize source and destination arrays
uint32_t source = 0x20000010; // SRAM Starting address where the LCD Task data is loaded
uint32_t destination = 0x48001014;
DMA_InitTypeDef DMA_InitStructure;
/* Enable DMA1 clock -------------------------------------------------------*/
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
DMA_DeInit(DMA1_Channel1);
DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t)destination;
DMA_InitStructure.DMA_MemoryBaseAddr = (uint32_t)source;
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralDST;
DMA_InitStructure.DMA_BufferSize = 16;
DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Enable;
DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord;
DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord;
DMA_InitStructure.DMA_Mode = DMA_Mode_Normal;
DMA_InitStructure.DMA_Priority = DMA_Priority_High;
DMA_InitStructure.DMA_M2M = DMA_M2M_Disable;
DMA_Init(DMA1_Channel1, &DMA_InitStructure);
DMA_Cmd(DMA1_Channel1, ENABLE);
LCD_Port_Set_Output(); // Just ensure that the LCD port is in output direction on the appropriate pin masks.
GPIO_SetBits(LCD_BUS_GPIO_PORT, LCD_E_PIN); // Toggle Enable pin on.
GPIO_ResetBits(LCD_BUS_GPIO_PORT, LCD_E_PIN); // Toggle Enable pin off.