Page 1 of 1

GP TIMER and WiFi/MQTT modules?

Posted: Sun Feb 09, 2025 9:57 am
by jwalkerbg
Hi,

I use GPIO interrupt & GP timer to create an algorithm to drive a triac by calculating the phase to produce a firing impulse. This works well.

However the application uses MQTT/WiFi connection to exchange data with an external application. When there is such communication (incoming and outgoing messages) the phase control is disturbed for while, until the communication is ongoing.

How to prevent this? Is it possible to be prevented? May be GP timer is used in Wifi module? Someone experienced such behavior?

Regards, Ivan

Re: GP TIMER and WiFi/MQTT modules?

Posted: Sun Feb 09, 2025 2:24 pm
by ahsrabrifat
You can run the TRIAC control on Core 1 and Wi-Fi on Core 0:

Code: Select all


xTaskCreatePinnedToCore(mqtt_task, "MQTT", 4096, NULL, 1, NULL, 0);
xTaskCreatePinnedToCore(triac_task, "TRIAC", 4096, NULL, 2, NULL, 1);


Re: GP TIMER and WiFi/MQTT modules?

Posted: Mon Feb 10, 2025 6:49 am
by MicroController
jwalkerbg wrote:
Sun Feb 09, 2025 9:57 am
I use GPIO interrupt & GP timer to create an algorithm to drive a triac by calculating the phase to produce a firing impulse.
You may want to check if you can use the MCPWM to do what you need in hardware.