watchdog reset using ledc with a frequency greater that 5M

paoloach
Posts: 1
Joined: Thu Jun 27, 2019 6:54 pm

watchdog reset using ledc with a frequency greater that 5M

Postby paoloach » Thu Jun 27, 2019 7:08 pm

Hi,
I have a strange behaviour using the ledc peripherical: if I set the time frequency greater 5Mhz it is all fine but if I set a greater frequency, for example 10Mhz, the watchdog it is no more feed and the chip reset with this message:
st:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)

It is my understanding that there is a default idle task that feed the watchdog so normally the watchdog is feeded but I don't understand why the ledc peripherical should block that tast.

My test code is:

Code: Select all

static const char *TAG = "test";

void app_main() {

  ledc_timer_config_t timer_conf = {
      .duty_resolution = LEDC_TIMER_1_BIT,
      .freq_hz = 10000000,
      .speed_mode = LEDC_HIGH_SPEED_MODE,
      .timer_num = LEDC_TIMER_0
  };
  esp_err_t err = ledc_timer_config(&timer_conf);
  if (err != ESP_OK) {
    ESP_LOGE(TAG, "ledc_timer_config failed, rc=%x", err);
  }
  
  ledc_channel_config_t ch_conf = {
      .channel = LEDC_CHANNEL_0,
      .timer_sel = LEDC_TIMER_0,
      .duty = 1,
      .speed_mode = LEDC_HIGH_SPEED_MODE,
      .hpoint     = 0,
      .gpio_num = CONFIG_XCLK
  };
  err = ledc_channel_config(&ch_conf);
  if (err != ESP_OK) {
    ESP_LOGE(TAG, "ledc_channel_config failed, rc=%x", err);
  }

  ESP_LOGI(TAG,"DONE");

}

Regards,
Paolo

Who is online

Users browsing this forum: No registered users and 96 guests