arch/xtensa/esp32s3: fix timer initialization

This commit is contained in:
Filipe Cavalcanti 2024-09-25 11:05:08 -03:00 committed by Xiang Xiao
parent 14f278ab89
commit a64171f059

View file

@ -37,6 +37,9 @@
#include "esp32s3_irq.h"
#include "esp32s3_gpio.h"
#include "soc/periph_defs.h"
#include "esp_private/periph_ctrl.h"
/****************************************************************************
* Private Types
****************************************************************************/
@ -969,6 +972,15 @@ struct esp32s3_tim_dev_s *esp32s3_tim_init(int timer)
}
}
if (tim->gid == ESP32S3_TIM_GROUP0)
{
periph_module_enable(PERIPH_TIMG0_MODULE);
}
else
{
periph_module_enable(PERIPH_TIMG1_MODULE);
}
/* Verify if it is in use */
if (!tim->inuse)