Page 2 of 2

Re: Timer triggered SPI read with circular DMA

Posted: Fri Jan 12, 2018 5:10 pm
by faisal
Giovanni wrote:Consistency is always a good thing, reworking things not necessarily as good, especially if one is trying to close a release.

Giovanni


Understood, and agreed. Any idea on a time frame for release :) ?

Giovanni wrote:The stream will be enabled by the spiXXX() transfer call, what you can do is to change (or disable) the TX DMA trigger by changing the dmatx field of the SPIDriver structure, you can make the DMA be triggered by a timer instead of SPI or you may write the SPI DR register in the PWM callback.


I don't understand how they can be disabled, as a call is made to the DMA configuration macros which dereference the dmatx and dmarx pointers - so there is nothing safe to set them to. If you add a check for NULL, you can ignore the calls to the dma configuration macros. That would work and be the most flexible. How about that?

Re: Timer triggered SPI read with circular DMA

Posted: Fri Jan 12, 2018 5:18 pm
by Giovanni
Sorry, I meant the "txdmamode" field, there you can change the DMA trigger channel to a timer channel (or nothing and then do direct writes the the SPI DR register).

Giovanni