Dual Core issues
Posted: Mon Mar 22, 2021 3:19 pm
I am writing cde for a antenna rotor, and would like to have the graphic code to run in one task, whereas getting the heading data from the antenna will run in another task. (I haven't written the last one yet, since i got stuck at the grafhics. The graphics itsself is running fine if i dont' use dual core.
However, when porting the code to a working simple dual core example. i got stuck and receive the following error code
It is the call to plotNeedle(angle,30) from this subroutine who creates the havoc, and i searched for days for a solution but could not find it.
The complete code is attached
Any help is very much appreciated....
Erik
However, when porting the code to a working simple dual core example. i got stuck and receive the following error code
- Task1 running on core 0
- Task2 running on core 1
- ⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮'⸮⸮⸮0000000 A8 : 0x800d46c8 A9 : 0x3ffd5900
- A10 : 0x007bef7b A11 : 0x007bef00 A12 : 0x000003ef A13 : 0x0000000f
- A14 : 0x00000006 A15 : 0x0000007e SAR : 0x00000016 EXCCAUSE: 0x0000001d
- EXCVADDR: 0x00000000 LBEG : 0x400d9098 LEND : 0x400d90fa LCOUNT : 0x00000002
- ELF file SHA256: 0000000000000000
- Backtrace: 0x400d46d1:0x3ffd5920 0x400d1075:0x3ffd5970 0x400d1144:0x3ffd59a0 0x400861e5:0x3ffd59c0
- Rebooting...
- Task1 running on core 0
- Task2 running on core 1
- Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
- Core 1 register dump:
- PC : 0x400d46d1 PS : 0x00060e30 A0 : 0x800d1078 A1 : 0x3ffd58c0
- A2 : 0x3ffc01b4 A3 : 0x3ffc02d8 A4 : 0x3ffbdbbc A5 : 0x00000000
- A6 : 0x00000002 A7 : 0x00000000 A8 : 0x800d46c8 A9 : 0x3ffd58a0
- A10 : 0x007bef7b A11 : 0x007bef00 A12 : 0x000003ef A13 : 0x0000000f
- A14 : 0x00000006 A15 : 0x0000007e SAR : 0x00000016 EXCCAUSE: 0x0000001d
- EXCVADDR: 0x00000000 LBEG : 0x400d9098 LEND : 0x400d90fa LCOUNT : 0x00000002
- //Task2code: blinks an LED every 700 ms
- void Task2code( void * pvParameters ){
- Serial.print("Task2 running on core ");
- Serial.println(xPortGetCoreID());
- variable = true;
- while (variable == true) {
- uint16_t angle = random(361); // random speed in range 0 to 240
- plotNeedle(angle, 30);
- variable = false;
- delay(500);
- }
- vTaskDelete(NULL);
- }
Any help is very much appreciated....
Erik