cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F1: DMA read once with USART3 in LIN Bus project

Rashad Shubita
Associate III

Hi everyone:cherry_blossom:

I start in learning LIN bus and I wrote a basic example contain master task and slave task in STM32f103 and communicate with one slave (stm32f429), the problem in stm32f1 MCU in that the DMA read just once! so the first frame sent correctly, but the second frame not, since the DMA does not read the second header frame(I checked and I found that the frame transmitted but not read back by DMA) (so can not transmit the response for slave 1).

Also, I noted that in debugging the DMA read the second frame and everything goes right! (I put the breakpoint in LIN_Slave_RX_DMA_IRQ_Callback,

LIN_Slave_TX_DMA_IRQ_Callback,

LIN_Slave_USART3_IRQ_Callback)

Here you can find the project:

http://www.mediafire.com/file/ujtdigyuru5bzun/LIN_Example.rar/file

Also, this is my Github profile you can find nice examples with stm32f103c8t6, you make sure to be up to date with it:) 

https://github.com/RashadShubita

Thanks in advance!

3 REPLIES 3
Rashad Shubita
Associate III

Finally, I find the error after 2 days of debuging 😁

And what was the error? (This may be helpful for other community members 🙂 )

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

I just forget to read last unused data in data register to reset over-run flag xD, the whole project now in my github

🙂