cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus/RTU communication using USART in L475

Harish1
Associate III

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?

4 REPLIES 4
Muhammed Güler
Senior III

​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
Associate III

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
Associate

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:

Thanks, Martin for your reply here too.