panel_st7796_draw_bitmap(280): send command failed when using WiFi Provisioning

MrHarmonSr
Posts: 3
Joined: Thu Nov 30, 2023 5:55 pm

panel_st7796_draw_bitmap(280): send command failed when using WiFi Provisioning

Postby MrHarmonSr » Wed Apr 03, 2024 7:21 pm

I am using a stm32s3-devkitC-1 v 1.0 connected to a Hosyond 3.5" 480x320 display via SPI and I2C (touch).
It is working as expected.
However when I try to add wifi provisioning. I am seeing this:
E (1822) lcd_panel.io.spi: panel_io_spi_tx_color(387): spi transmit (queue) color failed
E (1822) st7796: panel_st7796_draw_bitmap(280): send command failed
I (1972) AV_UART: anna_process_gram Bell success
I (1972) AV_UART: anna_process_gram Bell sent ack
I (1972) AnnaView: app_startSTM other FW version 0.1.7
E (6812) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (6812) task_wdt: - IDLE (CPU 1)
E (6812) task_wdt: Tasks currently running:
E (6812) task_wdt: CPU 0: IDLE
E (6812) task_wdt: CPU 1: LVGL task
E (6812) task_wdt: Print CPU 1 backtrace


This issue occurs if I call wifi_prov_mgr_init(); If this call is commented out, all is well.

NOTE: I was seeing a BLE mall;oc error, but I changed the following in bt.c
static void *malloc_internal_wrapper(size_t size)
{
//void *p = heap_caps_malloc(size, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL|MALLOC_CAP_DMA);
void *p = heap_caps_malloc(size, MALLOC_CAP_INTERNAL|MALLOC_CAP_DMA);
if(p == NULL) {
ESP_LOGE(BT_LOG_TAG, "Malloc failed - fixed");
}
return p;
}

I no longer see the BLE error, but my SPI transfers still fail.



dependencies:
idf: ">=4.4.2"
lvgl/lvgl: "9.0.0"
espressif/esp_lvgl_port: "^2.0.0"
espressif/esp_lcd_st7796: "^1.0.0"
espressif/esp_lcd_touch_ft5x06: "^1.0.6"
qrcode: "^0.1.0"

MrHarmonSr
Posts: 3
Joined: Thu Nov 30, 2023 5:55 pm

Re: panel_st7796_draw_bitmap(280): send command failed when using WiFi Provisioning

Postby MrHarmonSr » Fri Apr 05, 2024 4:11 pm

I have reproduced this problem combining this example ( https://github.com/sukesh-ak/BSP-IDF5-ESP_LCD-LVGL9 ) and the example wifi provisioning app ( \Espressif\frameworks\esp-idf-v5.1.2\examples\provisioning\wifi_prov_mgr\main).

First I initialize the display, so I can show a QR code, then I attempt to start the wifi provisioner. After startingh the provisioner I see
I (1556) LVGL: Starting LVGL task
I (1736) WiFiProv: WiFi_prov_init
I (1736) pp: pp rom version: e7ae62f
I (1736) net80211: net80211 rom version: e7ae62f
I (1746) wifi:wifi driver task: 3fcd70d4, prio:23, stack:6656, core=0
I (1746) wifi:wifi firmware version: 91b9630
I (1746) wifi:wifi certification version: v7.0
I (1746) wifi:config NVS flash: enabled
I (1756) wifi:config nano formating: disabled
I (1756) wifi:Init data frame dynamic rx buffer num: 32
I (1766) wifi:Init static rx mgmt buffer num: 5
I (1766) wifi:Init management short buffer num: 32
I (1776) wifi:Init static tx buffer num: 16
I (1776) wifi:Init tx cache buffer num: 32
I (1776) wifi:Init static tx FG buffer num: 2
E (1776) lcd_panel.io.spi: panel_io_spi_tx_color(387): spi transmit (queue) color failed
I (1786) wifi:E (1796) st7796: panel_st7796_draw_bitmap(280): send command failed
Init static rx buffer size: 1600
I (1806) wifi:Init static rx buffer num: 10
I (1806) wifi:Init dynamic rx buffer num: 32
I (1816) wifi_init: rx ba win: 6
I (1816) wifi_init: tcpip mbox: 32
I (1816) wifi_init: udp mbox: 6
I (1826) wifi_init: tcp mbox: 6
I (1826) wifi_init: tcp tx win: 5744
I (1826) wifi_init: tcp rx win: 5744
I (1836) wifi_init: tcp mss: 1440
I (1836) wifi_init: WiFi IRAM OP enabled
I (1846) wifi_init: WiFi RX IRAM OP enabled
I (1846) WiFiProv: WiFi_prov_init exit
I (1856) main_task: Returned from app_main()
E (6796) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (6796) task_wdt: - IDLE (CPU 1)
E (6796) task_wdt: Tasks currently running:
E (6796) task_wdt: CPU 0: IDLE
E (6796) task_wdt: CPU 1: LVGL task
E (6796) task_wdt: Print CPU 1 backtrace



The code works fine using display with a parallel interface.

MrHarmonSr
Posts: 3
Joined: Thu Nov 30, 2023 5:55 pm

Re: panel_st7796_draw_bitmap(280): send command failed when using WiFi Provisioning

Postby MrHarmonSr » Sun Apr 28, 2024 8:17 pm

After some debugging I found that I was seeing a memory allocation error, I ran out of IRAM.

I have tried many sdkconfig settings to try to free up enough for wifi provisioning using BLE, but no luck.
I reconfigured the wifi provisioning to use SoftAP and an able to get it running.

I have not found a good method of determining what configuration parameters work best.

Who is online

Users browsing this forum: No registered users and 63 guests