static memory I2C?

RMandR
Posts: 75
Joined: Mon Oct 29, 2018 3:13 pm

static memory I2C?

Postby RMandR » Fri Oct 01, 2021 12:12 am

Is there an alternate esp32 I2C driver that does not use malloc?

we have an ESP32 application with contained memory and it seems to fail sometimes because of malloc failing to allocate memory for I2C.

I haven't looked deeper to see if this is a heap fragmentation issue (is that even a thing in FreeRTOS?), memory leak, etc. But given the heavy use of the I2C (dedicated task), it seems more reliable to use an MCU based I2C driver as opposed to RTOS.

short of bit-banging a soft I2C driver, looking for a tested alternate esp32 I2C driver.

ESP_Sprite
Posts: 9715
Joined: Thu Nov 26, 2015 4:08 am

Re: static memory I2C?

Postby ESP_Sprite » Fri Oct 01, 2021 2:12 pm

FWIW, we're adding support for static memory to ESP-IDF; I'm not sure when that will show up on Github, though.

vonnieda
Posts: 145
Joined: Tue Nov 07, 2017 3:42 pm

Re: static memory I2C?

Postby vonnieda » Fri Oct 01, 2021 10:11 pm


RMandR
Posts: 75
Joined: Mon Oct 29, 2018 3:13 pm

Re: static memory I2C?

Postby RMandR » Sun Oct 03, 2021 9:32 pm

@ESP_Sprite
adding support for static memory to ESP-IDF
thanks for the heads up. Do you see an issue with using the HAL or LL layer version of I2C?

@vonnieda: Thanks for the link. Will look into it. Was hoping for a cleaner solution, though this by definition is what I asked for :D

Who is online

Users browsing this forum: Google [Bot] and 223 guests