dma_timer_set_fraction() inline docs refer to the fraction as a divider, but actually it's a multiplier #1677

Closed
opened 2024-03-24 22:38:53 -05:00 by myklemykle · 2 comments
myklemykle commented 2024-03-24 22:38:53 -05:00 (Migrated from github.com)

Calling the fraction a divider insinuates that this function is analogous to, for instance, pwm_config_set_clkdiv_int_frac() .
But that function divides clk_sys by a fraction, while dma_timer_set_fraction() multiplies clk_sys by a fraction.

I find it a little bit counterintuitive that RP2040 scales DMA timers with a multiplier and PWM timers with a divider, but that's what the datasheet says it does.

Calling the fraction a divider insinuates that this function is analogous to, for instance, pwm_config_set_clkdiv_int_frac() . But that function divides clk_sys by a fraction, while dma_timer_set_fraction() multiplies clk_sys by a fraction. I find it a little bit counterintuitive that RP2040 scales DMA timers with a multiplier and PWM timers with a divider, but that's what the datasheet says it does.
lurch commented 2024-03-25 04:53:23 -05:00 (Migrated from github.com)

Links to #1678

Links to #1678
kilograham commented 2024-07-19 14:03:53 -05:00 (Migrated from github.com)

#1678 merged

#1678 merged
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#1677
No description provided.