Hi,
I have some problem when configuring eDMA register in MPC5748G.
The code "pDMA->SEEI.R = (vuint8_t)channel" will cause an error.
And then the project could not run normally.
The attachment is my project.
What mistake that I have made?
And what can be helpful to deal with it ?
Thanks!
Regards,
Qian
Original Attachment has been moved to: mpc5748g_Z4_1.zip
Hi Qian,
at first, you program crashed in this function:
void DMAMUX_HAL_Init(struct DMAMUX_tag *pDMAMUX)
{
int i;
for (i = 0; i < FSL_FEATURE_DMAMUX_MODULE_CHANNELS; i++)
{
pDMAMUX->CHCFG[i].R = (uint8_t)0;
}
}
You cannot initialize all 32 DMAMUX channels, because there are two peripherals and their address spaces are not linked.
DMAMUX0 channel 15 has address FFF6_C00F
DMAMUX1 channel 1 has address FFF6_C200
You have to change the pointer.
About problem you mention in your post, pDMA pointer has value NULL, so it can point everywhere. This is the root cause of the IVOR0 exception.
Regards,
Martin