Hi Uwe,
On 7/15/24 5:09 PM, Uwe Kleine-König wrote:
Hello Quentin,
On Mon, Jul 15, 2024 at 02:16:15PM +0200, Quentin Schulz wrote:
[...]
To give a bit more info on this, there are two possible flavors of the MCU,
ATtiny 816 (datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/ATtiny416-816-DataSheet-DS40001913B.pdf)
and STM32F072CB (datasheet: https://www.st.com/content/ccc/resource/technical/document/reference_manual/c2/f8/8a/f2/18/e6/43/96/DM00031936.pdf/files/DM00031936.pdf/jcr:content/translations/en.DM00031936.pdf).
FYI, on ATtiny, we use TCA in single-slope PWM generation mode and PERBUF
and CMP2BUF as period and duty-cycle registers. On STM32, we use TIM15 in
PWM mode and ARR and CCR1 as period and duty-cycle registers.
Wouldn't it be more natural with these to have duty in a base-2 register
for duty, in the assumption that your MCUs habe this, too?
Not sure to understand what you meant by base-2 register here? I am
guessing you rather wanted to suggest a different unit/representation of
the duty cycle in the register in the FW API?
Cheers,
Quentin