GP TIMER and WiFi/MQTT modules?

jwalkerbg
Posts: 11
Joined: Tue Aug 15, 2023 12:37 pm

GP TIMER and WiFi/MQTT modules?

Postby jwalkerbg » Sun Feb 09, 2025 9:57 am

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

ahsrabrifat
Posts: 56
Joined: Sat Jan 18, 2025 2:31 pm

Re: GP TIMER and WiFi/MQTT modules?

Postby ahsrabrifat » Sun Feb 09, 2025 2:24 pm

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);


MicroController
Posts: 2045
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: GP TIMER and WiFi/MQTT modules?

Postby MicroController » Mon Feb 10, 2025 6:49 am

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.

Who is online

Users browsing this forum: Corand and 101 guests