Good Morning Everyone,
currently I try to config the DMA Channel for transfer 240x320 unit16_t values
from a Frame buffer in my RAM to the EBU Interface. But with the current
configuration and implementaion of the GPDMA0_0_IRQHandler the interface
not transfer each 16bit value to my LCD.
But if I use the conventional method with the for loops, my image content is
transferred to the display. yes with other words the EBU interface to the display
is configured correctly.
Has one of you an idea what I need to change about the configuration and or the
interrupt service Routine, so that I can move the data with the DMA interface
Thanks in advanced
Best regards
EbbeSand
currently I try to config the DMA Channel for transfer 240x320 unit16_t values
from a Frame buffer in my RAM to the EBU Interface. But with the current
configuration and implementaion of the GPDMA0_0_IRQHandler the interface
not transfer each 16bit value to my LCD.
But if I use the conventional method with the for loops, my image content is
transferred to the display. yes with other words the EBU interface to the display
is configured correctly.
Has one of you an idea what I need to change about the configuration and or the
interrupt service Routine, so that I can move the data with the DMA interface
Thanks in advanced
Best regards
EbbeSand
Code:
XMC_DMA_CH_CONFIG_t GPDMA0_Ch0_config =
{
.enable_interrupt = true,
.src_transfer_width = XMC_DMA_CH_TRANSFER_WIDTH_32,
.dst_transfer_width = XMC_DMA_CH_TRANSFER_WIDTH_32,
.src_address_count_mode = XMC_DMA_CH_ADDRESS_COUNT_MODE_INCREMENT,
.dst_address_count_mode = XMC_DMA_CH_ADDRESS_COUNT_MODE_NO_CHANGE,
.src_burst_length = XMC_DMA_CH_BURST_LENGTH_1,
.dst_burst_length = XMC_DMA_CH_BURST_LENGTH_1,
.enable_src_gather = true,
.enable_dst_scatter = false,
.transfer_flow = XMC_DMA_CH_TRANSFER_FLOW_M2M_DMA,
.src_addr = (uint32_t) &GuiLib_DisplayBuf.Words[0][0],
.dst_addr = (uint32_t) &LCD_RAM,
.src_gather_interval = 0,
.src_gather_count = 32,
.dst_scatter_interval = 0,
.dst_scatter_count = 0,
.block_size = 10,
.transfer_type = XMC_DMA_CH_TRANSFER_TYPE_MULTI_BLOCK_SRCADR_RELOAD_DSTADR_CONTIGUOUS,
.priority = XMC_DMA_CH_PRIORITY_7,
.src_handshaking = XMC_DMA_CH_SRC_HANDSHAKING_SOFTWARE,
};
void GPDMA_Init(void)
{
XMC_DMA_Init(XMC_DMA0);
XMC_DMA_CH_Init(XMC_DMA0, 0, &GPDMA0_Ch0_config);
XMC_DMA_CH_EnableEvent(XMC_DMA0, 0, XMC_DMA_CH_EVENT_BLOCK_TRANSFER_COMPLETE);
XMC_DMA_IRQHandler(XMC_DMA0);
NVIC_SetPriority(GPDMA0_0_IRQn,11);
NVIC_EnableIRQ(GPDMA0_0_IRQn);
}
void GPDMA0_0_IRQHandler(void)
{
uint32_t event;
event = XMC_DMA_CH_GetEventStatus(XMC_DMA0,0);
if(event == XMC_DMA_CH_EVENT_BLOCK_TRANSFER_COMPLETE)
{
XMC_DMA_CH_ClearEventStatus(XMC_DMA0, 0, XMC_DMA_CH_EVENT_BLOCK_TRANSFER_COMPLETE);
counter++;
if (counter > 240)
{
XMC_DMA_CH_Disable(XMC_DMA0,0);
}
else
{
XMC_DMA_CH_SetSourceAddress(XMC_DMA0, 0, (uint32_t) &GuiLib_DisplayBuf.Words[counter][0]);
XMC_DMA_CH_Enable(XMC_DMA0,0);
}
}
}