Quantcast
Channel: Embedded Software (Read Only)
Viewing all articles
Browse latest Browse all 25965

Forum Post: RE: GIO_create, SIO_create returning NULL or handles with bad config - debugging

$
0
0

I had the EDMA null handle problem.  I was working with the C6748 which has 2 EDMA controllers, so I had created an array of EDMA handles with a length of 2. 

The compiler thought it was okay but it didn't work in practice.

I changed to separate handle objects and it worked fine.

//handles are global because they are used in a few different tasks

EDMA3_DRV_Handle hEdma0;
EDMA3_DRV_Handle hEdma1;

init function:

EDMA3_DRV_Result EDMA3Initialize(void)
{
EDMA3_DRV_Result edmaResult = EDMA3_DRV_SOK;

memset(hEdma0,0,sizeof(hEdma0));
memset(hEdma1,0,sizeof(hEdma1));

hEdma0 = edma3init(0, &edmaResult);
if(hEdma0)
{
System_printf("EDMA0 init passed\n\r");
}
else
{
System_printf("EDMA0 init failed \r\n");
}
hEdma1 = edma3init(1, &edmaResult);
if(hEdma1)
{
System_printf("EDMA1 init passed\n\r");
}
else
{
System_printf("EDMA1 init failed \r\n");
}


return edmaResult;

}

Have you tried looking at the    &gio_create_status  after you call the function?  If it returns NULL it should return an error code.


Viewing all articles
Browse latest Browse all 25965

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>