Hello,
I am running a program with multiple tasks on the ESP32 module, which are continuously employing GPIO interrupts, timer interrupts and WiFi communication.
After running for a few hours, the system suddenly crashed and reset itself with the following message on the monitor:
W (30) boot ...
Search found 24 matches
- Fri May 11, 2018 9:47 pm
- Forum: General Discussion
- Topic: CPU crash due to DPort access?
- Replies: 2
- Views: 6277
- Wed Apr 25, 2018 12:36 pm
- Forum: General Discussion
- Topic: Pinning tasks to Core for ISR
- Replies: 3
- Views: 8768
Pinning tasks to Core for ISR
I read the following on the ESP-IDF doc
Care should be taken when allocating an interrupt using a task not pinned to a certain core; while running code not in a critical section, these tasks can migrate between cores at any moment, possibly making an interrupt operation fail because of the reasons ...
Care should be taken when allocating an interrupt using a task not pinned to a certain core; while running code not in a critical section, these tasks can migrate between cores at any moment, possibly making an interrupt operation fail because of the reasons ...
- Mon Apr 23, 2018 12:17 pm
- Forum: General Discussion
- Topic: GPIO interrupt flags
- Replies: 6
- Views: 16149
Re: GPIO interrupt flags
Just to clarify,
So how can 2 GPIO interrupts(attached to different ISR's) which may occur simultaneously, be detected correctly, if they are ultimately being multiplexed into 1 CPU interrupt? (using the ESP_INTR_FLAG_DEFAULT flag)
Won't they need to keep track of separate flags to correctly ...
So how can 2 GPIO interrupts(attached to different ISR's) which may occur simultaneously, be detected correctly, if they are ultimately being multiplexed into 1 CPU interrupt? (using the ESP_INTR_FLAG_DEFAULT flag)
Won't they need to keep track of separate flags to correctly ...
- Mon Apr 23, 2018 2:30 am
- Forum: General Discussion
- Topic: GPIO interrupt flags
- Replies: 6
- Views: 16149
Re: GPIO interrupt flags
The example shows how to set up a simple GPIO interrupt which I already understand. I am talking about a case with multiple GPIO interrupts running on different pins, and threads.
How should the gpio_install_isr_service(int intr_alloc_flags) be used in that case?
The argument which takes flags ...
How should the gpio_install_isr_service(int intr_alloc_flags) be used in that case?
The argument which takes flags ...
- Sun Apr 22, 2018 8:43 pm
- Forum: General Discussion
- Topic: GPIO interrupt flags
- Replies: 6
- Views: 16149
GPIO interrupt flags
Hello,
I wanted some clarification regarding the gpio_install_isr_service(int intr_alloc_flags) function.
In my system, I have 2 sources of GPIO interrupts on different pins, running in different threads. Therefore I am installing the GPIO ISR service once in the main file. But what argument ...
I wanted some clarification regarding the gpio_install_isr_service(int intr_alloc_flags) function.
In my system, I have 2 sources of GPIO interrupts on different pins, running in different threads. Therefore I am installing the GPIO ISR service once in the main file. But what argument ...
- Mon Apr 16, 2018 3:52 pm
- Forum: General Discussion
- Topic: multi-thread I2C synchronization
- Replies: 12
- Views: 24531
Re: multi-thread I2C synchronization
Yes, I too had a doubt this. Any clarification regarding how to go about it?* The I2C APIs are not thread-safe, if you want to use one I2C port in different tasks,
* you need to take care of the multi-thread issue.
Thanks
- Wed Apr 11, 2018 11:01 pm
- Forum: General Discussion
- Topic: multi-thread I2C synchronization
- Replies: 12
- Views: 24531
Re: multi-thread I2C synchronization
Alright. That means I don't need to install and delete the I2C driver everytime I enter the mutex. I would just need to send the I2C address as the first byte within the mutex, for every I2C operation.
Also, I should be using a single I2C controller(I2C 0 OR I2C 1) for both I2C slaves, since I ...
Also, I should be using a single I2C controller(I2C 0 OR I2C 1) for both I2C slaves, since I ...
- Wed Apr 11, 2018 10:19 pm
- Forum: General Discussion
- Topic: multi-thread I2C synchronization
- Replies: 12
- Views: 24531
Re: multi-thread I2C synchronization
Sorry, allow me to rephrase.
I mean during every context switch, do I need to install and delete the I2C driver within a mutex, for concurrent I2C communication?
Installing the I2C driver entails pointing to the buffer where the slave address is stored.
Is there a better way to perform concurrent ...
I mean during every context switch, do I need to install and delete the I2C driver within a mutex, for concurrent I2C communication?
Installing the I2C driver entails pointing to the buffer where the slave address is stored.
Is there a better way to perform concurrent ...
- Wed Apr 11, 2018 9:02 pm
- Forum: General Discussion
- Topic: multi-thread I2C synchronization
- Replies: 12
- Views: 24531
multi-thread I2C synchronization
I am using an ESP32 board to communicate with an LCD and an I/O expander using an I2C bus. I am working the ESP-IDF environment.
I am using 2 separate threads for the LCD and I/O expander each to concurrently access them. I am trying to use a mutex to implement thread-safe I2C. Do I need to install ...
I am using 2 separate threads for the LCD and I/O expander each to concurrently access them. I am trying to use a mutex to implement thread-safe I2C. Do I need to install ...
- Sun Jan 28, 2018 5:51 pm
- Forum: General Discussion
- Topic: MCP23017 Port Expander
- Replies: 9
- Views: 31514
Re: MCP23017 Port Expander
Hello,
I'm interfacing MCP23017 IO expander with the ESP32. I was going to use the modified Adafruit_MCP23017 library: https://github.com/nkolban/esp32-snippets/tree/master/hardware/expanders/mcp23017
However, I noticed that it is a .cpp file.
My entire code is in C. Is there a way to use this ...
I'm interfacing MCP23017 IO expander with the ESP32. I was going to use the modified Adafruit_MCP23017 library: https://github.com/nkolban/esp32-snippets/tree/master/hardware/expanders/mcp23017
However, I noticed that it is a .cpp file.
My entire code is in C. Is there a way to use this ...