drivers: counter: rtc: esp32: Limit minimum time for set_alarm
Include value of 30 us as not valid to set alarm for RTC counter. Change included to allow RTC timer to be properly set to use RC_FAST_D256 as clock source. Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
This commit is contained in:
parent
7d696f5b69
commit
d33b8f6314
@ -116,8 +116,8 @@ static int counter_esp32_set_alarm(const struct device *dev, uint8_t chan_id,
|
||||
|
||||
#if defined(CONFIG_SOC_SERIES_ESP32) || defined(CONFIG_SOC_SERIES_ESP32C2) || \
|
||||
defined(CONFIG_SOC_SERIES_ESP32C3)
|
||||
/* In ESP32/C3 Series the min possible value is 30 us*/
|
||||
if (counter_ticks_to_us(dev, alarm_cfg->ticks) < 30) {
|
||||
/* In ESP32/C3 Series the min possible value is 30+ us*/
|
||||
if (counter_ticks_to_us(dev, alarm_cfg->ticks) <= 30) {
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user