Problem in eDMA driver in RT117x chips

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Problem in eDMA driver in RT117x chips

630 次查看
abady1000
Contributor III

Hello,

I am not sure if this is the right place, but there is a problem I face in the SDK and fixed, and I thought I should mention it here.

 

I am programming on NXP i.MX RT1170 and was trying to use the eDMA to transfer some video lines, but it failed miserably! it never complete the whole lines, when I was trying to do 288 line it moved only around 40 lines (I am trying to move 288 lines by doing 288 scatter gather operations).

The hardware doesn't seem to have such restrictions, and the TCD blocks are stored in external memory anyway!

I dug into the driver and found out that the function which set the size of TCD block has the following form:

 

 

 

void EDMA_InstallTCDMemory(edma_handle_t *handle, edma_tcd_t *tcdPool, uint32_t tcdSize)

 

 

 

 
But in the body of the function I found the following:

 

 

 

void EDMA_InstallTCDMemory(edma_handle_t *handle, edma_tcd_t *tcdPool, uint32_t tcdSize)
{
    assert(handle != NULL);
    assert(((uint32_t)tcdPool & 0x1FU) == 0U);

    handle->header  = 1;
    handle->tcdUsed = 0;
    handle->tcdSize = (int8_t)tcdSize; // !!!!!!!!!
    handle->flags   = 0;
    handle->tcdPool = tcdPool;
}

 

 

 

It converts the uint32_t integer into int8 integer !

That means the maximum size I can transfer is only 128! (which is the case)

And by digging more into the driver I found that the handle data and other functions uses int8_t type for no obvious reason.

After modifying it all into uint16_t it worked seamlessly for me.

I hope this can be modified in future version of the drivers.

Regards

0 项奖励
回复
3 回复数

602 次查看
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @abady1000 ,

Thanks for your effects!

This does seem a bit strange, I will submit this to the relevant internal team for review and I will be very much in sync with you once I have come to a conclusion.

Best regards,
Gavin

591 次查看
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @abady1000 

It has been confirmed by me and the internal team that this is indeed a software bug. It has been submitted internally and will be fixed later. Thank you very much for your efforts and contributions!

Best regards,
Gavin

585 次查看
abady1000
Contributor III

Hi Gavin,

 

That is amazing, thank you

 

Regards,

Abdullah Alamoodi

0 项奖励
回复