can/driver: Add module reset before enabling
This commit is contained in:
parent
7314f44b13
commit
ffce53449b
1 changed files with 1 additions and 0 deletions
|
@ -673,6 +673,7 @@ esp_err_t can_driver_install(const can_general_config_t *g_config, const can_tim
|
||||||
ret = ESP_ERR_INVALID_STATE;
|
ret = ESP_ERR_INVALID_STATE;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
periph_module_reset(PERIPH_CAN_MODULE);
|
||||||
periph_module_enable(PERIPH_CAN_MODULE); //Enable APB CLK to CAN peripheral
|
periph_module_enable(PERIPH_CAN_MODULE); //Enable APB CLK to CAN peripheral
|
||||||
configASSERT(can_enter_reset_mode() == ESP_OK); //Must enter reset mode to write to config registers
|
configASSERT(can_enter_reset_mode() == ESP_OK); //Must enter reset mode to write to config registers
|
||||||
can_config_pelican(); //Use PeliCAN addresses
|
can_config_pelican(); //Use PeliCAN addresses
|
||||||
|
|
Loading…
Reference in a new issue