This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how to use uarte in 1M baud. RXD.AMOUNT will not update until fill up rxbuffer?

SDK:V15

chip:52832

development kit:window+keil

In stm32,inder to use uart rx with DMA, we could easily use:uart Idle interrupt+dma.but how in 52832 while how many byte of a frame to recevie is uncertainty?

in order to test,i designed a master mcu to transmit circulaly,each frame 11byte,period is 1s,baud 1M.

How to config 52832 uarte rx?

my try:set RXD.MAXCNT 255(a big buf). A time hanlder function(detect_a_frame)  which call back each 1ms.in this funtion,read RXD.AMOUNT ,judge wheather recevie amount of buf had changed.if its amount unequal to 0,also stop change,regard a frame recevie finish.call function to change rx dma fifo manually.

unfortunately, it don't work.because i found that RXD.AMOUNT will not update until fill up rxbuf.like below:(the mosaic is the data had recevied, here maybe had run few second)

How could i make it work in case of 1M baud???I really holp for your help or offer a successful demo.Appreciate!!!

Parents Reply
  • Hi 

    If you need to stay on SDK v15.0.0 it should still be possible to copy the lib_uarte driver from SDK v16.0.0, so that you can take advantage of the latest version of this driver. 

    Also, I would strongly recommend migrating to SDK v15.3.0 even if you find it too much work to go all the way to SDK v16.0.0. 

    SDK v15.3.0 should be compatible with SDK v15.0.0, but contains a number of improvements and additions compared to v15.0.0. 

    Best regards
    Torbjørn

Children
Related