properly reset module
danielkucera "It looks like the module is much more stable when reset bit is first set and then cleared."
This commit is contained in:
parent
c2d6b13103
commit
5415ff65c3
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue