Skip to content

Commit

Permalink
fix(PeriphDrivers): Fix MAX32655 WDT clock source order (#820)
Browse files Browse the repository at this point in the history
Signed-off-by: Furkan Akkiz <[email protected]>
Signed-off-by: Sadik Ozer <[email protected]>
Co-authored-by: Sadik Ozer <[email protected]>
  • Loading branch information
hfakkiz and ozersa authored Dec 15, 2023
1 parent 2c062d6 commit c9af9ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Libraries/PeriphDrivers/Source/OWM/owm_me14.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ int MXC_OWM_Init(const mxc_owm_cfg_t *cfg, sys_map_t map)
return E_NOT_SUPPORTED;
}

return MXC_OWM_RevA_Init((mxc_owm_reva_regs_t *)MXC_OWM, cfg);
err = MXC_OWM_RevA_Init((mxc_owm_reva_regs_t *)MXC_OWM, cfg);

return err;
}

void MXC_OWM_Shutdown(void)
Expand Down
2 changes: 1 addition & 1 deletion Libraries/PeriphDrivers/Source/WDT/wdt_me17.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ int MXC_WDT_SetClockSource(mxc_wdt_regs_t *wdt, mxc_wdt_clock_t clock_source)
#if TARGET_NUM == 32655 || TARGET_NUM == 78000
mxc_wdt_clock_t clock_sources[2][8] = {
{ MXC_WDT_PCLK, MXC_WDT_IBRO_CLK, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
{ MXC_WDT_IBRO_CLK, MXC_WDT_ERTCO_CLK, MXC_WDT_INRO_CLK, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
{ MXC_WDT_IBRO_CLK, MXC_WDT_INRO_CLK, MXC_WDT_ERTCO_CLK, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
};
#elif TARGET_NUM == 32680
mxc_wdt_clock_t clock_sources[2][8] = {
Expand Down
1 change: 1 addition & 0 deletions Libraries/PeriphDrivers/Source/WDT/wdt_revb.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ void MXC_WDT_RevB_ClearIntFlag(mxc_wdt_revb_regs_t *wdt)
void MXC_WDT_RevB_SetClockSource(mxc_wdt_revb_regs_t *wdt, int clock_source)
{
const uint8_t clock_source_num = 8; // Max number of clock sources for Rev B WDT
(void)clock_source_num;

MXC_ASSERT((clock_source < clock_source_num) && (clock_source >= 0));
MXC_SETFIELD(wdt->clksel, MXC_F_WDT_REVB_CLKSEL_SOURCE,
Expand Down

0 comments on commit c9af9ee

Please sign in to comment.