How to use s32k146 uart + dma to receive data which the length is variable?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to use s32k146 uart + dma to receive data which the length is variable?

1,729件の閲覧回数
biyangdong
Contributor II

Hi:

I have too many uart data to receive, and the frame length is not sure, and I do not want so many uart interrupt, so I want use DMA, but the dam generally should give the numbers of  received data,i get some idears  which is uesd in stm32.

Roughly follow the following steps:

step1:  enbale the uart dma receive

step2:  set the dma receive buffer data number with a larger number than your send,and the dma will store the data to buffer without stop

step3: once you complete a frame data,the bus is idle,it will be trigger the idle interrupt

step4: in the uart idle interrupt handler functions,you can calculate how many bytes you have received

step5: deal with the received data,and clean the flags,than received the next frames

I have some problems about this resolves:

1. if the method above is suitable for s32k14x too?

2. i cant find the idle interrupt in the mapping,how i can create a idle interrupt and do some logical processing in the IRQHandler functions?

11111.png2222.png3333.png

3. how can I get the dma store buffer data number when the idle interrupt is triggered?

4.is there example about the  uart + idle interrupt + dma ?

thank you for your reply。

3 返答(返信)

1,284件の閲覧回数
autolan22
Contributor III

ditto

0 件の賞賛
返信

1,302件の閲覧回数
TysonHu
Contributor II

Same question. Is there any solution?

1,671件の閲覧回数
simiongustavo
Contributor I

Hello, I have the same problem, did you manage to find a solution?