mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
can/driver: Add module reset before enabling
This commit is contained in:
parent
dc63c2e9cb
commit
fc31437236
@ -672,6 +672,7 @@ esp_err_t can_driver_install(const can_general_config_t *g_config, const can_tim
|
||||
ret = ESP_ERR_INVALID_STATE;
|
||||
goto err;
|
||||
}
|
||||
periph_module_reset(PERIPH_CAN_MODULE);
|
||||
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
|
||||
can_config_pelican(); //Use PeliCAN addresses
|
||||
|
Loading…
Reference in New Issue
Block a user