Skip to main content
Rashad Shubita
Associate III
March 30, 2019
Question

STM32F1: DMA read once with USART3 in LIN Bus project

  • March 30, 2019
  • 1 reply
  • 1353 views

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!

This topic has been closed for replies.

1 reply

Rashad Shubita
Associate III
March 30, 2019

Finally, I find the error after 2 days of debuging :beaming_face_with_smiling_eyes:

Amel NASRI
Technical Moderator
April 1, 2019

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

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
Rashad Shubita
Associate III
April 3, 2019

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

:)