/* configure counter value, window value, and prescaler divider value  */
void wwdgt_config(uint16_t counter, uint16_t window, uint32_t prescaler)
/* configure counter value, window value, and prescaler divider value  */
void wwdgt_config(uint16_t counter, uint16_t window, uint32_t prescaler)
{
    uint32_t reg_cfg = 0U, reg_ctl = 0U;
    reg_cfg = (WWDGT_CFG &(~(WWDGT_CFG_WIN|WWDGT_CFG_PSC)));
    reg_ctl = (WWDGT_CTL &(~WWDGT_CTL_CNT));
    reg_cfg |= CFG_WIN(window);
    reg_cfg |= prescaler;
    reg_ctl |= CTL_CNT(counter);
    WWDGT_CTL = reg_ctl;
    WWDGT_CFG = reg_cfg;
}