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.
CONFIG_GPIO_CTRL_FUNC_IN_IRAM
-
- Posts: 9746
- Joined: Thu Nov 26, 2015 4:08 am
Re: CONFIG_GPIO_CTRL_FUNC_IN_IRAM
If your esp-idf is recent enough, it's in menuconfig, under main → Component config → Driver configurations → GPIO Configuration
Re: CONFIG_GPIO_CTRL_FUNC_IN_IRAM
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"
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"
-
- Posts: 9746
- Joined: Thu Nov 26, 2015 4:08 am
Re: CONFIG_GPIO_CTRL_FUNC_IN_IRAM
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: MicroController and 70 guests