fix: resolve boot loop — increase stack sizes, silence RPM spam logging
drive_task stack 2048→4096 (ESP_LOGI with 7 args overflowed 2048 frame). vesc_can_send_rpm: ESP_LOGI→ESP_LOGD (was logging 100x/sec at 50Hz×2). sdkconfig.defaults: add CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192 (SPI init call chain overflowed default 3584-byte main task stack). Firmware confirmed stable on bd-66hx: 1 boot cycle in 12 seconds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a05de8d49a
commit
8d411e2603
@ -166,7 +166,7 @@ void app_main(void)
|
||||
xTaskCreate(orin_serial_tx_task, "orin_tx", 2048, s_orin_tx_q, 9, NULL);
|
||||
if (!g_twai_bus_off) {
|
||||
xTaskCreate(vesc_can_rx_task, "vesc_rx", 4096, s_orin_tx_q, 10, NULL);
|
||||
xTaskCreate(drive_task, "drive", 2048, NULL, 8, NULL);
|
||||
xTaskCreate(drive_task, "drive", 4096, NULL, 8, NULL);
|
||||
} else {
|
||||
ESP_LOGW(TAG, "CAN disabled — vesc_rx and drive tasks not started");
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ void vesc_can_send_rpm(uint8_t vesc_id, int32_t erpm)
|
||||
msg.data[1] = (uint8_t)(u >> 16u);
|
||||
msg.data[2] = (uint8_t)(u >> 8u);
|
||||
msg.data[3] = (uint8_t)(u);
|
||||
ESP_LOGI(TAG, "send_rpm vesc_id=%u erpm=%" PRId32 " ext_id=0x%08" PRIx32, vesc_id, erpm, ext_id);
|
||||
ESP_LOGD(TAG, "send_rpm vesc_id=%u erpm=%" PRId32 " ext_id=0x%08" PRIx32, vesc_id, erpm, ext_id);
|
||||
esp_err_t err = twai_transmit(&msg, pdMS_TO_TICKS(5));
|
||||
if (err != ESP_OK) {
|
||||
ESP_LOGW(TAG, "twai_transmit failed vesc_id=%u err=0x%x", vesc_id, err);
|
||||
|
||||
@ -7,3 +7,4 @@ CONFIG_TWAI_ISR_IN_IRAM=y
|
||||
CONFIG_UART_ISR_IN_IRAM=y
|
||||
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
|
||||
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
|
||||
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user