2017-02-25 05:47 PM
Hello! This is a code of cubemx for f4 discovery board. Can anyone tell me why TIM6 Update event occurs each TIM6CLK/256 ? This timer is a trigger for DAC to generator wave . Thanks !!!!
2017-02-25 06:24 PM
I don't know, does the data table or sine wave have 256 entries?
The period is 2048 ticks of TIMCLK, that would be impacted by the APB clock
2017-02-25 08:25 PM
no.the data table has 6 value only. const uint8_t aEscalator8bit[6] = {0x0, 0x33, 0x66, 0x99, 0xCC, 0xFF};
I don't undertand 256 is meaning. I think that
and TIM6 Update event occurs each 0x7FF / TIM6CLK = 2048/ 84MHz. Is this true? Clive One! help me please.
2017-02-26 12:57 AM
My two cents here...
Set ADC with DMA cycling through 0x00, 0x1F (square wave with small amplitude due to slew rate) and look with a scope on the DAC output to see the sample true frequency.
Prior to use non probing trigger signal, maybe using another timer with similar settings and outputing a pulse on a GPIO channel, then wire it to the DAC Trigger input pin and observe the periodicity.
Last option, if the output sampling rate is 256 times too slow, change 0x7FF by 0x007? (blind patch)