mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-28 19:54:07 +08:00
use io_timer_set_PWM_mode not direct reg
This commit is contained in:
parent
d21c44704d
commit
11191e54e0
@ -606,7 +606,7 @@ int io_timer_set_rate(unsigned timer, unsigned rate)
|
||||
*/
|
||||
|
||||
if (reallocate_channel_resources(channels, IOTimerChanMode_OneShot, IOTimerChanMode_PWMOut)) {
|
||||
rPSC(timer) = (io_timers[timer].clock_freq / BOARD_PWM_FREQ) - 1;
|
||||
io_timer_set_PWM_mode(timer);
|
||||
}
|
||||
|
||||
timer_set_rate(timer, rate);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user