Skip to content

Commit

Permalink
Fix TMR prescaler
Browse files Browse the repository at this point in the history
We passed in the clock source instead of the prescaler to
MXC_TMR_RevB_SetPrescalar. Fix to pass in cfs->pres.

Signed-off-by: Michael Perkins <michael.perkins@analog.com>
  • Loading branch information
perkinsmg committed Sep 6, 2024
1 parent 98f7b67 commit 8b1aa23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/PeriphDrivers/Source/TMR/tmr_revb.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ int MXC_TMR_RevB_Init(mxc_tmr_revb_regs_t *tmr, mxc_tmr_cfg_t *cfg, uint8_t clk_
tmr->intfl |= (MXC_F_TMR_REVB_INTFL_IRQ_A | MXC_F_TMR_REVB_INTFL_IRQ_B);

MXC_TMR_RevB_SetClockSource(tmr, cfg->bitMode, clk_src);
MXC_TMR_RevB_SetPrescalar(tmr, cfg->bitMode, clk_src);
MXC_TMR_RevB_SetPrescalar(tmr, cfg->bitMode, cfg->pres);

//TIMER_16B only supports compare, oneshot and continuous modes.
switch (cfg->mode) {
Expand Down

0 comments on commit 8b1aa23

Please sign in to comment.