cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 RS-485 DMA questions

ken2
Associate II
Posted on October 22, 2009 at 14:33

STM32 RS-485 DMA questions

5 REPLIES 5
ken2
Associate II
Posted on May 17, 2011 at 13:26

We are planning to use STM32 DMA for tx/rx with RS-485 using a USART and a few questions have come up.

1. Under what conditions might a DMA TEIE transfer error interrupt occur? The ref manual says ''bus error'' but is that something that would ever be expected with working hardware?

2. What should the response to a DMA transfer error be? Does the entire DMA channel need to be reinitialized and reenabled or is reenabling it sufficient?

As an aside, other postings in this forum refer to a ''broken'' USART idle frame interrupt when using DMA for receive with variable length messages but this seems to work OK here with USART2 at 115kbs. Does this break at higher speeds or was this fixed with a silicon revision? I am currently using an STM310E-EVAL board for development.

Thanks for any insights.

tomas23
Associate II
Posted on May 17, 2011 at 13:26

1. concerning the TEI(E), this occurs if DMA accesses reserved AHB space (not allowed/non-existing), or if there is a master conflict (FSMC, see errata)

2. re-enabling is enough, but beware: the DMA starts with the initial parameters, so it doesn't continue with aborted transfer

3. no idea...

ken2
Associate II
Posted on May 17, 2011 at 13:26

Thank you for your reply.

If I understand correctly the TIE(E) interrupt should not then occur if there are no external memory devices, right?

Thanks again.

ken2
Associate II
Posted on May 17, 2011 at 13:26

Quote:

On 21-10-2009 at 22:53, Anonymous wrote:

Seems to work OK for me at more than 300k baud in async mode.

In further testing it seems to work fine here at 921.6kbs in async mode, which is our target speed.

We're using two STM32E-Eval boards back-to-back for this test and it's sort of amazing it works at that rate given the ST3232ECTR interface chips on the eval boards only guarantee 250kbs. At 921.6kbs the RS232 waveform looks pretty bad on a scope.

[ This message was edited by: ken.schumm on 22-10-2009 18:34 ]

gds2
Associate II
Posted on May 17, 2011 at 13:26

Quote:

On 14-10-2009 at 16:52, Anonymous wrote:

As an aside, other postings in this forum refer to a ''broken'' USART idle frame interrupt when using DMA for receive with variable length messages but this seems to work OK here with USART2 at 115kbs. Does this break at higher speeds or was this fixed with a silicon revision? I am currently using an STM310E-EVAL board for development.

Seems to work OK for me at more than 300k baud in async mode.