[DONE] UART problems

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Been thanked: 7 times

Re: [TODO] UART problems

Post by barthess »

Update,
Bug with UART fixed but fix cause malfunction of I2C. Current I2C driver sets STM32_DMA_CR_DMEIE STM32_DMA_CR_TEIE STM32_DMA_CR_TCIE only once at start. After first call of dmaStreamDisable() in ISR driver can not start new transactions.

The simplest way I see is setting of that flags at begining of every I2C transaction. Are there more elegant solutions?

Update2
Probably some other DMA based drivers broken that way.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [TODO] UART problems

Post by Giovanni »

I don't see any, I am retesting all drivers using DMA. Could you please try SDC too?

Giovanni
User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Been thanked: 7 times

Re: [TODO] UART problems

Post by barthess »

Not a problem. I will fix I2C and check SDC myself.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [TODO] UART problems

Post by Giovanni »

ADC and SPI are OK. If I remember well the SDC does not use the DMA interrupt so probably it is fine too, the problems is limited to I2C, you could use the same approach used in SPI, have a variable with the DMA settings into the driver structure.

Giovanni
User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Been thanked: 7 times

Re: [TODO] UART problems

Post by barthess »

Giovanni,
Do you plan to backport this DMA fix to 2.4.x stable branch? Change log has

Code: Select all

- FIX: Fixed spurious interrupt disabling an STM32 DMA stream (bug 3607518)
  (backported to 2.4.4).

but I can not find changes in code. Am I looking at wrong place (https://chibios.svn.sourceforge.net/svn ... able_2.4.x)?

I2C driver fixed in my local working copy and tested on F4x and F1x. SDC driver works withot problems.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [TODO] UART problems

Post by Giovanni »

Hi,

It is not in the stable branch yet, I was waiting for your feedback first. Please commit on trunk then I'll backport it.

Giovanni
User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Been thanked: 7 times

Re: [TODO] UART problems

Post by barthess »

Done.
Post Reply