-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32s3 - abort panic after initialization many peripherals (IDFGH-8414) #9880
Comments
Hi @krzysiek-sd, For example, Additionally, for some peripherals (like I2C and GPIO), you can share the CPU interrupt. This helps reduce the total number of CPU interrupts your code needs. To do this, use ESP_INTR_FLAG_SHARED flag. For more information, please check the interrupt allocation docs: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/system/intr_alloc.html |
I'm going to close the issue, please feel free to leave another comment if you still have this problem. |
Related to espressif#6709 Related to espressif#7767 Related to espressif#9880 Related to espressif#11462
Related to espressif#6709 Related to espressif#7767 Related to espressif#9880 Related to espressif#11462
Answers checklist.
IDF version.
v4.4.1, V4.4.2, v5.1-dev-992-gaf28c1fa21
Operating System used.
Windows
How did you build your project?
Eclipse IDE
If you are using Windows, please specify command line type.
No response
Development Kit.
ESP32-S3-DevKitC-1
Power Supply used.
USB
What is the expected behavior?
All peripherals should be initialized with no panic abort.
What is the actual behavior?
Is panic abort after initialized mcpwm module. When I put UART initialization before mcpwm then abort panic is after UART initialization.
Steps to reproduce.
I am using ESP-IDF v5.1.
Only need to run code below to cause a problem.
Debug Logs.
More Information.
#include <stdio.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "sdkconfig.h"
#include "esp_log.h"
#include <esp_system.h>
#include "driver/uart.h"
#include "driver/gpio.h"
#include "driver/spi_master.h"
#include "driver/i2c.h"
#include "driver/gptimer.h"
#include "hal/mcpwm_ll.h"
#include "driver/mcpwm_cap.h"
#define TIMER_FREQ 1000000 //1MHz so resolution 1us
#define SYS_TIMER_PERIOD TIMER_FREQ/1000 //1ms
#define Z_MEAS_2P_TIMER_PERIOD TIMER_FREQ/100 //100us
#define ECHO_TEST_TXD (CONFIG_EXAMPLE_UART_TXD)
#define ECHO_TEST_RXD (CONFIG_EXAMPLE_UART_RXD)
#define ECHO_TEST_RTS (UART_PIN_NO_CHANGE)
#define ECHO_TEST_CTS (UART_PIN_NO_CHANGE)
#define ECHO_UART_PORT_NUM (CONFIG_EXAMPLE_UART_PORT_NUM)
#define ECHO_UART_BAUD_RATE (CONFIG_EXAMPLE_UART_BAUD_RATE)
#define ECHO_TASK_STACK_SIZE (CONFIG_EXAMPLE_TASK_STACK_SIZE)
#define BUF_SIZE (1024)
#define SPI_ADS131A02_CLK_FREQ_HZ (1200001000) //1MHz - min stable SCLK for ADS131A02 is 25MHz
#define I2C_LCD_EXPANDER_MASTER_NUM I2C_NUM_0 /*!< I2C master i2c port number, the number of i2c peripheral interfaces available will depend on the chip /
#define I2C_LCD_EXPANDER_MASTER_FREQ_HZ 800000 /!< I2C master clock frequency */
#define I2C_LCD_EXPANDER_MASTER_SDA_IO 35
#define I2C_LCD_EXPANDER_MASTER_SCL_IO 36
#define I2C_OTHER_DEVICES_MASTER_NUM I2C_NUM_1 /*!< I2C master i2c port number, the number of i2c peripheral interfaces available will depend on the chip /
#define I2C_OTHER_DEVICES_MASTER_FREQ_HZ 10000 /!< I2C master clock frequency */
#define I2C_OTHER_DEVICES_MASTER_SDA_IO 47
#define I2C_OTHER_DEVICES_MASTER_SCL_IO 48
#define I2C_MASTER_TIMEOUT_MS 1000
#define I2C_MASTER_RX_BUF_DISABLE 0 /*!< I2C master doesn't need buffer /
#define I2C_MASTER_TX_BUF_DISABLE 0 /!< I2C master doesn't need buffer */
#define ESP_INTR_FLAG_DEFAULT 0
#define GPIO_ADC_SPI_CS 11
#define GPIO_ADC_DRDY 13
#define GPIO_SYNCH_H 4
#define GPIO_SYNCH_L 5
#define GPIO_SYNCH_V0_A 6
#define GPIO_POWER_LOCK 2
#define GPIO_POWER_BUTTON 1
static const char *TAG = "TEST";
static bool IRAM_ATTR SysTimerISRcallback(gptimer_handle_t timer, const gptimer_alarm_event_data_t *edata, void *user_data)
{
BaseType_t high_task_awoken = pdFALSE;
}
static bool IRAM_ATTR Synch_L_isr_handler(mcpwm_cap_channel_handle_t cap_chan, const mcpwm_capture_event_data_t *edata, void *user_data)
{
bool ret = 0;
}
static bool IRAM_ATTR Synch_H_isr_handler(mcpwm_cap_channel_handle_t cap_chan, const mcpwm_capture_event_data_t *edata, void *user_data)
{
bool ret = 0;
}
static bool IRAM_ATTR Synch_V0_isr_handler(mcpwm_cap_channel_handle_t cap_chan, const mcpwm_capture_event_data_t *edata, void *user_data)
{
bool ret = 0;
}
static void ADC_SetCS(void)
{
gpio_set_level(14, 1);
}
static void ADC_ClrCS(void)
{
gpio_set_level(14, 1);
}
void app_main(void)
{
}
You can find a link to my project below.
https://github.com/krzysiek-sd/ESP32-S3
The text was updated successfully, but these errors were encountered: