UART RX SDMA problem on iMX6Q

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

UART RX SDMA problem on iMX6Q

跳至解决方案
2,574 次查看
AlexeyT
Contributor III

Hi All,

I am facing a quite a strange issue with the subject.

It look like it only partially works.

I have UART4 configured for SDMA with

- RXTL set to 16 bytes

- TXTL set to 16 bytes

- DMA ageing turned on

- SDMA watermark level set to 16 bytes as well

I am having problem when transfer size is exactly 16 bytes, in this case SDMA interrupt does not trigger.

If I send from 1 to 15 bytes I receive RX interrupt and get the data correctly.

If I send 16 bytes I don't get RX interrupt at all.

If I send 16 bytes and then 1 extra byte after a delay I will get interrupt and read all 17 bytes ok.

To me it look like I can get DMA data ageing interrupt but can't get normal watermark based interrupt.

I tripple checked UART code and cannot find any issue, everything look completely fine.

Checked SDMA channel configuration and found no configuration error as well.

Can you please suggest where do I need to have a look to check fo SDMA possible watermark errors?

It look like only UART that suffers, other devices which use SDMA work completely fine.

My platform is Windows Embedded Compact 7.

Thanks,

Alexey

标签 (1)
标记 (3)
0 项奖励
1 解答
1,532 次查看
Yuri
NXP Employee
NXP Employee

Hello,

When DMA is applied, some issues may be caused by improper FIFO read

watermark level : say,  configure it so, that burst length is half of FIFO. 


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
5 回复数
1,532 次查看
shinichiichimur
Contributor I

dear yuri,

I see, I'm ok. thanks.

Regard,

Ichimura

0 项奖励
1,532 次查看
shinichiichimur
Contributor I

Dear Yuri,

I have the similar issue on iMX6SoloLite, and I can't fix it with Alexey's way. I configured below, 

- TXTL set to 16 bytes

- TXTL set to 16 bytes

- DMA ageing turned on

- SDMA watermark level set to 8 bytes as well

but SDMA interrupt didn't trigger with exact 16 bytes. Does this solution work on iMX6SoloLite?

 

BR,

Ichimura

0 项奖励
1,532 次查看
Yuri
NXP Employee
NXP Employee

Hello, Ichimura !

  Is it possible for You to create separate thread in this Community or

create request Sales and Support|NXP   ? 

Regards,

Yuri.

0 项奖励
1,533 次查看
Yuri
NXP Employee
NXP Employee

Hello,

When DMA is applied, some issues may be caused by improper FIFO read

watermark level : say,  configure it so, that burst length is half of FIFO. 


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
1,532 次查看
AlexeyT
Contributor III

Hi Yuri,

I reduced watermark level in SDMA configuration to 8 bytes which is 1/2 of RXTL (keeping RXTL at 16 bytes).

It fixed the issue.

Tried other configuration variants but nothing else seem to work.

Thanks for help.

Alexey

0 项奖励