Page 2 of 2

Re: [TODO] UART problems

Posted: Sun Mar 10, 2013 2:04 pm
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.

Re: [TODO] UART problems

Posted: Sun Mar 10, 2013 2:12 pm
by Giovanni
I don't see any, I am retesting all drivers using DMA. Could you please try SDC too?

Giovanni

Re: [TODO] UART problems

Posted: Sun Mar 10, 2013 2:23 pm
by barthess
Not a problem. I will fix I2C and check SDC myself.

Re: [TODO] UART problems

Posted: Sun Mar 10, 2013 2:58 pm
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

Re: [TODO] UART problems

Posted: Sun Mar 10, 2013 7:28 pm
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.

Re: [TODO] UART problems

Posted: Sun Mar 10, 2013 9:42 pm
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

Re: [TODO] UART problems

Posted: Sun Mar 10, 2013 10:27 pm
by barthess
Done.