Skip to main content
Harish1
Associate III
November 23, 2021
Question

Modbus/RTU communication using USART in L475

  • November 23, 2021
  • 4 replies
  • 1782 views

Hi,

There is a feature provided by ST in the L475 controller that Modbus/RTU communication using USART. Can we ignore the USART RX interrupt as the end of block detection interrupt provided by this feature to collect the data?

Is this block detection feature better to use compared to SW implementation?

This topic has been closed for replies.

4 replies

Muhammed Güler
Senior III
November 24, 2021

​dma and idle line detection is a good data reading method. set dma with oversized memory and set usart idle line interrupt. When the usart idle line interrupt comes, you get all the data in a single interrupt. and this works with most stm32s.

https://github.com/MaJerle/stm32-usart-uart-dma-rx-tx

Harish1
Harish1Author
Associate III
November 25, 2021

Hi Muhammed,

Thank you for sharing the information.

My one more doubt is that, without using the DMA and what is the benefit of giving a block out detection feature(Modbus/RTU communication using USART in L475

paragraph mentioned in the user guide) in the user guide?

MOtze.1
Visitor II
December 3, 2021

Well if not using DMA there is little gain in using the idleLine interrupt. Only gain would be that the SW does not need to keep trak of time to detect this ide line, but would still need to interrupt for each character.

 That said the idle line interrupt is thee function that enables the use of DMA for modbus telegrams. And thus adding god offload to the SW:

Harish1
Harish1Author
Associate III
December 4, 2021

Thanks, Martin for your reply here too.