Search found 166 matches
- Thu Mar 28, 2019 9:59 pm
- Forum: ESP32 Arduino
- Topic: ESP32 2Tasks on 2 Cores - Board reset
- Replies: 6
- Views: 9887
Re: ESP32 2Tasks on 2 Cores - Board reset
An example of a round robin: #include "freertos/event_groups.h" /* define event bits */ #define TASK_1_BIT ( 1 << 0 ) //1 #define TASK_2_BIT ( 1 << 1 ) //10 #define TASK_3_BIT ( 1 << 2 ) //100 #define ALL_SYNC_BITS (TASK_1_BIT | TASK_2_BIT | TASK_3_BIT) //111 /* create event group */ EventGroupHandl...
- Thu Mar 28, 2019 9:49 pm
- Forum: ESP32 Arduino
- Topic: ESP32 2Tasks on 2 Cores - Board reset
- Replies: 6
- Views: 9887
Re: ESP32 2Tasks on 2 Cores - Board reset
Your issue could be one of two tasks Task2 or loop(). loop() runs on core 1 and, using freeRTOS loop should look like this : void loop() Also, the default priority of loop() is 1,assign your taskings to something higher than 1; like 3. And, please, use code tags. Also, your tasks exit. Once they hav...
- Thu Mar 28, 2019 6:04 pm
- Forum: ESP32 Arduino
- Topic: [solved] One upload, I am fine, the next upload, not so well
- Replies: 1
- Views: 5707
Re: [solved] One upload, I am fine, the next upload, not so well
In the past I got away with using for SPI, GPIO pins 14, 12, and 13. This time, not the case. The LSM9DS1, begins outputting data as soon as its able; shortly after power up. Using those above pins, I am suspecting GPIO 12; a.k.a. TDI, as I used that for MISO, the LSM9DS1 began outputting a data str...
- Thu Mar 28, 2019 4:52 pm
- Forum: ESP32 Arduino
- Topic: [solved] One upload, I am fine, the next upload, not so well
- Replies: 1
- Views: 5707
[solved] One upload, I am fine, the next upload, not so well
Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "ESP32 Dev Module, Disabled, Default, 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Debug" Sketch uses 193616 bytes (14%) of program storage space. Maximum is 1310720 bytes. Global variables use 12768 bytes (3%) of dynamic memory, lea...
- Tue Mar 26, 2019 11:32 am
- Forum: ESP32 Arduino
- Topic: Switching from String to std::string is way harder than I thought !
- Replies: 4
- Views: 11336
Re: Switching from String to std::string is way harder than I thought !
Have you considered using sString.reserve(x) where x is the String buffer size to use, sString.concate( "xxx") to add to the string, sString ="" to clear the string buffer, and a few other functions to work on/with the string buffer? .reserve() assigns an allocated memory space that does not get/cau...
- Thu Mar 21, 2019 3:31 pm
- Forum: ESP32 Arduino
- Topic: C++ Standard Template Library with ESP32?
- Replies: 2
- Views: 5934
Re: C++ Standard Template Library with ESP32?
Now just writing, if you want a queue freeRTOS might work for you?
- Wed Mar 20, 2019 4:35 pm
- Forum: ESP32 Arduino
- Topic: FreeRTOS, dual-core, two task, ...to slow
- Replies: 11
- Views: 17468
Re: FreeRTOS, dual-core, two task, ...to slow
This loop does nothing for most of the time it is running but occupy CPU clock ticks while (1) { for (i = 0; i <1000; i ++) digitalWrite (tick, HIGH); for (i = 0; i <1000; i ++) digitalWrite (tick, LOW); esp_task_wdt_reset (); } Your code, from the looks of it, writes 1000 times a HIGH and 1000 time...
- Wed Mar 20, 2019 1:14 pm
- Forum: ESP32 Arduino
- Topic: FreeRTOS, dual-core, two task, ...to slow
- Replies: 11
- Views: 17468
Re: FreeRTOS, dual-core, two task, ...to slow
In that case one could use ESP.getCycleCount(): https://www.instructables.com/id/625-Nanosecond-Resolution-Timer-for-Any-Microcontr/ Actually doing a search on " freertos timing faster than millisecond" gives a number of work arounds to the 1mS limit. There is also using a Hardware Timer and a event...
- Wed Mar 20, 2019 1:13 pm
- Forum: ESP32 Arduino
- Topic: FreeRTOS, dual-core, two task, ...to slow
- Replies: 11
- Views: 17468
Re: FreeRTOS, dual-core, two task, ...to slow
You know you can use vTaskDelay( x ) where x is the number of CPU clock ticks you want to delay? With the ESP32 CPU running at 240Mhz, you get a clock tick every 0.0000041666666666667 ms. All you do is figure out how many clock ticks you want to wait or! You can use vTaskDelayUntil https://www.free...
- Wed Mar 20, 2019 11:31 am
- Forum: ESP32 Arduino
- Topic: FreeRTOS, dual-core, two task, ...to slow
- Replies: 11
- Views: 17468
Re: FreeRTOS, dual-core, two task, ...to slow
You know you can use vTaskDelay( x ) where x is the number of CPU clock ticks you want to delay? With the ESP32 CPU running at 240Mhz, you get a clock tick every 0.0000041666666666667 ms. All you do is figure out how many clock ticks you want to wait or! You can use vTaskDelayUntil https://www.freer...