diff --git a/src/CAN.c b/src/CAN.c index 826f9db..7e80b98 100644 --- a/src/CAN.c +++ b/src/CAN.c @@ -171,6 +171,7 @@ int CAN_init() { // enable module DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN); + DPORT_SET_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST); DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST); // configure TX pin @@ -296,4 +297,4 @@ int CAN_config_filter(const CAN_filter_t* p_filter) { __filter.AMR3 = p_filter->AMR3; return 0; -} \ No newline at end of file +}