Add BQ soft reset function

This commit is contained in:
jazzpi
2022-08-04 14:32:25 +02:00
parent 1be16efadf
commit 48d8a90c4a
3 changed files with 10 additions and 0 deletions

View File

@ -44,8 +44,15 @@ void afe_init(UART_HandleTypeDef* uarthandle) {
afe_wakeup();
HAL_Delay(10);
afe_soft_reset();
}
void afe_soft_reset() {
bq_status = BQ_INIT_PHASE;
BQ_Write_Register(DEV_CNTRL, DEV_CNTRL_SIZE, DEV_CNTRL_SOFT_RESET);
HAL_Delay(10);
afe_config_communication();
afe_config_measurement_channels();