noInterrupts() function resets ESP32-S2.
Posted: Wed Nov 09, 2022 1:52 pm
Hi, I'm new to using ESP32-S2, I've always worked with Atmega328p and now I'm using ESP.
I created a PCB with an ESP32-S2 on it, I didn't use any module, but the chip soldered directly to the board. Everything has been working fine, PWM, ADC, I2C, UART, etc. But when I use the noInterrupts() function, the ESP32-S2 simply restarts, I've done several tests, I used the cli(), portDISABLE_INTERRUPTS() functions and they keep putting the ESP in a restart cycle every time it arrives at the function.
I'm using a 40Mhz crystal with 18pF capacitors.
I will attach a print of the ESP32-S2 connections in my project and a small arduino code that makes my ESP restart.
I created a PCB with an ESP32-S2 on it, I didn't use any module, but the chip soldered directly to the board. Everything has been working fine, PWM, ADC, I2C, UART, etc. But when I use the noInterrupts() function, the ESP32-S2 simply restarts, I've done several tests, I used the cli(), portDISABLE_INTERRUPTS() functions and they keep putting the ESP in a restart cycle every time it arrives at the function.
I'm using a 40Mhz crystal with 18pF capacitors.
I will attach a print of the ESP32-S2 connections in my project and a small arduino code that makes my ESP restart.
Code: Select all
void setup() {
// put your setup code here, to run once:
gpio_set_direction(GPIO_NUM_17, GPIO_MODE_INPUT_OUTPUT);
delay(2000);
gpio_set_level(GPIO_NUM_17, !gpio_get_level(GPIO_NUM_17));
cli();
}
void loop() {
// put your main code here, to run repeatedly:
}