2020-10-27 07:39 AM
Hello I am using the STM32F334 for Lighting and I have had to use the DMA to transfer duty cycle data to the PWM duty register. The DMA is set up in circular mode and there is no interrupt. The priority it set to High. But i notice this pauses between the packets. I would have expected it to have no pauses. Please how can I get rid of this? Please see the image of actual light intensity. Hope to hear from you. thanks
Solved! Go to Solution.
2020-10-27 08:04 AM
Maybe an off-by-one error in your DMA data.
2020-10-27 07:50 AM
There are no pictures. Note, that this wreck of software does not support pasting pictures, even if it appears to do so - you need to upload it as file, after clicking on the picture icon below.
Read out and post content of relevant TIM and DMA registers.
JW
2020-10-27 08:04 AM
Maybe an off-by-one error in your DMA data.
2020-10-28 02:20 AM
2020-10-28 02:20 AM
2020-10-28 02:23 AM
Read out and post content of relevant TIM and DMA registers.
Also read out and post content of relevant data array.
JW
2020-10-28 02:28 AM
Maybe it would be helpful to implement the DMA interrupt handler and toggle pins (at half/complete transfer) so you can understand the timing of things better - and toggle different pins where you poll/send data. That way you can use an oscilloscope/analyser to view the actual timings (and maybe figure out what is going wrong). If you write direct to the BSRR register it only uses a few assembler instructions to set/reset a line/led (GPIOA->BSRR = ....)
2020-10-28 03:12 AM
2020-10-28 03:13 AM
2020-10-28 03:16 AM
Thanks i think there is an issue with the data.