arch/xtensa/esp32s3: fix timer initialization
This commit is contained in:
parent
14f278ab89
commit
a64171f059
1 changed files with 12 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue