MPC5748G eDMA register configuration error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5748G eDMA register configuration error

817 Views
shifeiqian
Contributor II

Hi,

I have some problem when configuring eDMA register in MPC5748G.

153029_153029.png1.png

The code "pDMA->SEEI.R = (vuint8_t)channel" will cause an error.

153030_153030.png2.png

And then the project could not run normally.

153031_153031.png3.png

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

Labels (1)
Tags (2)
1 Reply

651 Views
martin_kovar
NXP Employee
NXP Employee

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.

pastedImage_0.png

Regards,

Martin