2020-12-27 06:19 AM
I need to divide a 24.576 MHz signal down to 12.288 MHz for a low power ADC so thought a timer would do this easily. But either I'm missing something or I have to put a value of 1 in the compare register and reload the counter all the time which seems rather wasteful on power. Is there a simpler way to just divide a signal by two by putting it in TIMx_ETR and outputting on one of the TIMx_CHy pins, presumably with the rest of the counter bits free-running ?
Thanks
2020-12-27 06:37 AM
Which STM32?
Is the 24.576 MHz signal an external signal unrelated to the STM32 system clock?
Probably the simplest is to get the 24.576 MHz serve as one of the two external clocks, set ARR=1 and one a spare channel one of the PWM modes and CCRx=1.
Note, that TIM are synchronous, so 1. given TIM internal clock has to be > 2x 24.576 MHz, 2. the output duty may be not 50:50.
JW
2020-12-27 06:45 AM
STM32F730.
The 24.576 comes from another device. No relation to the clocks in the F730. Just trying to save using a HC74 as I have spare pins on the F730.
Can live with not 50:50 but not with jitter.
2020-12-27 10:51 AM
LPTIM should be present except of the 64-pin package. LPTIM is asynchronous.
Unfortunately, ST traditionally gives NO (0) characterization data on LPTIM. I believe it should run at 24MHz clock OK.
JW
2020-12-27 11:36 AM
Yes I found LPTIM but unfortunately I'm using the 64 pin package. Spec I found was 16MHz. I'll go back to using a HCMOS divider :(
Many thanks for trying.
2020-12-27 12:43 PM
> Spec I found was 16MHz.
Where?
JW
2020-12-27 12:47 PM
AN4865, end section 5. 15MHz, not 16MHz, but not clear if that is all the time or just when the rest of the IC is stopped.
2020-12-27 01:27 PM
Thanks.
JW