i.mx28 AUART problem

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

i.mx28 AUART problem

1,077 次查看
ctspotgreen
Contributor II

I want to improve auart real time capability,but I found some problem:

1. FIFO length is fixed,can't be changed,and in DMA mode,it must be opened

2. It can't generate an interrupt when auart rx pin receives one byte data

3. Because AUART DMA timeout function needed at least 1 bit time delay,I added a signal pin to trig driver to read rx buffer.When the AUART received data,then signal pin trigged interrupt,then the program entered the interrupt service.In ISR,I forced to stop DMA and copy DMA data to buffer,then I read receive FIFO.However,I can't get the right FIFO status from the AUART status register.

         MCU send data to i.mx28 AUART and trig i.mx28 pinctrl interrupt-->In ISR,memcpy(buffer,DMA Buffer,DMA received length)

I need help,thanks!!!

标签 (1)
0 项奖励
回复
1 回复

839 次查看
alejandrolozan1
NXP Employee
NXP Employee

Hi,

I have delved into this and it seems that the UART status like RXCOUNT field is updated only at the DMA RX interrupt or RX timeout interrupt.

You could wait until the timeout or maybe use the DEBUG registers of the DMA (DEBUG1  and DEBUG2). ("transfer in progress" state vs "transfer done" state in DEBUG1 register or number of bytes remaining for transfer in DEBUG2 register)

Alejandro

0 项奖励
回复