AdaCore / Ada_Drivers_Library

Ada source code and complete sample GNAT projects for selected bare-board platforms supported by GNAT.
BSD 3-Clause "New" or "Revised" License
240 stars 141 forks source link

Don't use DMA Half Transfer Complete #276

Closed simonjwright closed 5 years ago

simonjwright commented 5 years ago

The previous attempt at this solution (#274) gave the user too much control over what was intended to be an implementation for the general user. This version eliminates the observed problem (the Half_Transfer_Complete_Indicated status wasn’t always cleared, resulting in a postcondition failure) by not enabling the Half Transfer Complete interrupt and not checking the corresponding status (note, the status will become set regardless of whether the interrupt is enabled).

Fabien-Chouteau commented 5 years ago

Thanks @simonjwright this looks like a good solution. Did you test it on the Crazyflie?

simonjwright commented 5 years ago

@Fabien-Chouteau said

Did you test it on the Crazyflie?

Yes, indeed! Without the "ignore the status", and with ADA_BUILD set to Debug, the postcondition failed within a minute or two (the transfer count was 6). With "ignore the status", the Crazyflie ran for a couple of hours.

Fabien-Chouteau commented 5 years ago

Thanks a lot @simonjwright !

pat-rogers commented 5 years ago

On 9/18/2018 11:25 AM, Fabien Chouteau wrote:

Thanks a lot @simonjwright https://github.com/simonjwright !

Yes indeed!