2009-05-27 01:22 PM
TIM0/1 PWM duty control by DMAC by OC2 match signal
2011-05-17 12:57 AM
I'm trying to drive PWM output by employing TIM0 and TIM1 with combinational usage of DMAC.
Those timers are set as PWM mode. DMAC is used for update of OC1(duty) at the timing of the last OC2 match to CNTR. DMAS is set as OC2 and DMAE=1 in TIMx blocks. The values to be set to OC1 are tabled and allocated in RAM. In DMAC channels, DEST_Peripheral is set to TIM0(or TIM1), memory-to-peripheral transfer is specified. But, DMAC channels do not load OC1 values.... DMAC channels seems to receive request signal properly (corresponding DMA_SSR bits indicate that and DMA_ENCS indicate that the corresponding DMA channels are responding.) Why do not the DMAC channels proceed transfer ?2011-05-17 12:57 AM
Hi all,
It's me again. Just for comparison, I made some experimental code. In place of DMAS:OC2 from TIM0/1, I tried Ext Req. DMA control triggered by Ext (P3.0 or P3.1) is shown in ST's application note. Fortunately, physical pin node for P3.0 and P3.1 are also connected to DMA Ext req0 and req1 as default inputs and TIM0 PWM and TIM1 PWM as their Alt3 output. I set TIM0 and TIM1 PWM output also to those pins. In this experimental implementation, DMA channels worked fine. What I did modify is just the request source setting, nothing more. By this result, I came to have doubt about something is wrong around DMA request signal handing made inside the STR912F. Acknowlege signal (which should make source signal clear) from DMAC might NOT be routed back to the proper request signal source...., at least in case of TIM's OC2 is chosen. Is there anybody who has succeeded in triggering DMAC by TIMx's OC2 ? I'm testing on Olimex STR-E912 board, which comes with STR912F, not FA. I'm not sure that the similar behavior is observed also with STR912FA or not..2011-05-17 12:57 AM
I'm curious kojima, did you ever find a solution to your problem (aside from using the external pin that you experimented with) ? I have a similar application problem as you had, and was looking for any pointers you may have learned.
Thanks, Rich