CONFIG_GPIO_CTRL_FUNC_IN_IRAM

doliveira
Posts: 4
Joined: Mon May 23, 2022 5:58 pm

CONFIG_GPIO_CTRL_FUNC_IN_IRAM

Postby doliveira » Mon May 23, 2022 6:08 pm

I am using the function esp_register_freertos_tick_hook_for_cpu() to register a function that gets called on every system timer tick.
The function is getting called, but when I attempt to perform a GPIO with the function gpio_set_level() I get:

Guru Meditation Error: Core 1 panic'ed (Cache disabled but cached memory region accessed).

According to the documentation I have to set the flag CONFIG_GPIO_CTRL_FUNC_IN_IRAM.
After searching the entire Epressif directory tree, I cannot find a reference to this symbol anywhere.
How do I enable placing the GPIO into IRAM?

Thank you.

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

Re: CONFIG_GPIO_CTRL_FUNC_IN_IRAM

Postby ESP_Sprite » Tue May 24, 2022 1:52 am

If your esp-idf is recent enough, it's in menuconfig, under main → Component config → Driver configurations → GPIO Configuration

doliveira
Posts: 4
Joined: Mon May 23, 2022 5:58 pm

Re: CONFIG_GPIO_CTRL_FUNC_IN_IRAM

Postby doliveira » Thu May 26, 2022 3:17 pm

Thank you for the reply.

When I run "idf.py --version" I get "ESP-IDF v4.4-dirty".
I downloaded the Espressif tools about a month ago.
Is there a newer version?

When I run "idf.py menuconfig" "Component config -> Driver configurations -> GPIO Configuration" the only option is "Support light sleep..."

When I search for "CONFIG_GPIO_CTRL_FUNC_IN_IRAM" it says "No Matches"

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

Re: CONFIG_GPIO_CTRL_FUNC_IN_IRAM

Postby ESP_Sprite » Fri May 27, 2022 1:10 am

Could be that it's a 5.0 feature and as such not in 4.4 yet... As an alternative, you could try tweaking the GPIO bits directly; something like:

Code: Select all

#include "soc/gpio_struct.h"
#define PIN_TO_TOGGLE 21 //for example

[...]
GPIO.out_w1ts.val=(1<<PIN_TO_TOGGLE); //make pin high
GPIO.out_w1tc.val=(1<<PIN_TO_TOGGLE); //make pin low

Who is online

Users browsing this forum: biterror, spenderIng and 186 guests