Skip to content

fix(PeriphDrivers): Fix MAX32655 WDT clock source order #820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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