Search found 218 matches

by jcsbanks
Sat May 18, 2019 8:26 pm
Forum: ESP32 IDF
Topic: mbedTLS memory usage per connection / mbedtls_ssl_context
Replies: 3
Views: 75

Re: mbedTLS memory usage per connection / mbedtls_ssl_context

Do you use PSRAM? I got about 40KB of IRAM back using AWS by enabling that option.

libwebsockets has a custom mbedTLS for the ESP32 that mentioned memory savings, but see: https://github.com/warmcat/lws-esp32-factory/issues/47
by jcsbanks
Fri May 17, 2019 3:26 pm
Forum: ESP32 IDF
Topic: CAN vs OTA: interrupt watchdog timeouts despite delay in OTA and IRAM_ATTR in CAN
Replies: 8
Views: 378

Re: CAN vs OTA: interrupt watchdog timeouts despite delay in OTA and IRAM_ATTR in CAN

So far, this is working well with code in IRAM, with 300ms interrupt watchdog timeout it is not being triggered. The loss of IRAM was <2KB, whereas just moving mbed_tls buffers to IRAM recovered about 40KB.

I have not yet reverted the OTA delay and tested with a large partition, will be interesting.
by jcsbanks
Thu May 16, 2019 9:26 am
Forum: ESP32 IDF
Topic: Faster, optimized ESP-IDF fork + PSRAM Issues
Replies: 14
Views: 1849

Re: Faster, optimized ESP-IDF fork + PSRAM Issues

Is there any update on this? I'm using 4MB of PSRAM and both cores, and dare not release our product.
by jcsbanks
Wed May 15, 2019 9:14 am
Forum: ESP32 IDF
Topic: CAN vs OTA: interrupt watchdog timeouts despite delay in OTA and IRAM_ATTR in CAN
Replies: 8
Views: 378

Re: CAN vs OTA: interrupt watchdog timeouts despite delay in OTA and IRAM_ATTR in CAN

In can_intr_handler_main I'm trying to pick out all the things that need to be IRAM_ATTR: can_get_status(); can_get_interrupt_reason() can_intr_handler_err_warn(&status, &task_woken, &alert_req); can_intr_handler_err_passive(&alert_req); can_intr_handler_bus_err(&alert_req); can_intr_handler_arb_los...
by jcsbanks
Wed May 15, 2019 7:48 am
Forum: ESP32 IDF
Topic: CAN vs OTA: interrupt watchdog timeouts despite delay in OTA and IRAM_ATTR in CAN
Replies: 8
Views: 378

Re: CAN vs OTA: interrupt watchdog timeouts despite delay in OTA and IRAM_ATTR in CAN

Thanks @ESP_Dazz The duration was 2 seconds for the interrupt watchdog timer in the NVS crash dump above, and the likelihood of it happening is similar to if it is set to 300ms, which makes me suspect a lock. This example interrupt watchdog timeout had queue lengths of 800 with 600 CAN frames per se...
by jcsbanks
Tue May 14, 2019 5:10 pm
Forum: ESP32 IDF
Topic: CAN vs OTA: interrupt watchdog timeouts despite delay in OTA and IRAM_ATTR in CAN
Replies: 8
Views: 378

Re: CAN vs OTA: interrupt watchdog timeouts despite delay in OTA and IRAM_ATTR in CAN

Sometimes get Int WDT timeout when NVS is written by WiFi. It often seems to happen at startup after doing an OTA update. I really need to dig into this CAN driver code and fix this. I already have the timeout at 2 seconds and it seems NVS and other stuff doesn't take this long and although there is...
by jcsbanks
Wed May 08, 2019 8:17 am
Forum: ESP32 IDF
Topic: CAN vs OTA: interrupt watchdog timeouts despite delay in OTA and IRAM_ATTR in CAN
Replies: 8
Views: 378

Re: CAN vs OTA: interrupt watchdog timeouts despite delay in OTA and IRAM_ATTR in CAN

Yes.

I can rewrite and split some tasks to get them on separate cores. Problem is that many things are able to write flash potentially, so nearly everything would end up on the other core to the CAN interrupt.
by jcsbanks
Tue May 07, 2019 9:36 pm
Forum: ESP32 IDF
Topic: CAN vs OTA: interrupt watchdog timeouts despite delay in OTA and IRAM_ATTR in CAN
Replies: 8
Views: 378

Re: CAN vs OTA: interrupt watchdog timeouts despite delay in OTA and IRAM_ATTR in CAN

I'd like to follow this up. Whilst a vTaskDelay of 4ms works for OTA updates, I notice interrupt watchdog timeouts with the CAN driver in other circumstances involving writing to flash, such as if the NVS is written by the WiFi driver or a large file is written to FATFS. The two approaches I see are...
by jcsbanks
Sat May 04, 2019 8:26 pm
Forum: ESP32 IDF
Topic: Max .rodata 4MB? How to use 12MB in 16MB WROVER for fast .rodata? FATFS is slow.
Replies: 8
Views: 278

Re: Max .rodata 4MB? How to use 12MB in 16MB WROVER for fast .rodata? FATFS is slow.

Curveball is that the 2nd stage bootloader wants to load all the segments to do checksums/hashes of them. If you don't load all the segments, it cannot do that as it is written, and it looks like it does it on all the segments in the partition at once. It will boot the OTA app with the extra unloade...

Go to advanced search