How to synchronize the serial port of ESP32 Dual Core

khalil_dz
Posts: 8
Joined: Sat Dec 22, 2018 4:14 pm

How to synchronize the serial port of ESP32 Dual Core

Postby khalil_dz » Wed Jan 16, 2019 1:56 am

I have a serial communication problem, because a core does not support transmitting (TX) and receiving (RX) 5 variable in bouck time at 4ms / 5ms.
Is it possible to do two port synchronization serial1> (RX) in core1 and port serial2> (TX) in core 2.
thanck.

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: How to synchronize the serial port of ESP32 Dual Core

Postby ESP_Sprite » Wed Jan 16, 2019 8:53 am

So you need a different baud rate for Tx and Rx? If so, you can indeed use two UARTs for this. I'm not sure why you'd need two separate cores for this, though.

khalil_dz
Posts: 8
Joined: Sat Dec 22, 2018 4:14 pm

Re: How to synchronize the serial port of ESP32 Dual Core

Postby khalil_dz » Sat Jan 19, 2019 10:32 pm

Tx and Rx same speed( baud rate).
insufficient loop time (4 ms)for transmitted (6 Int variable) and receive (4 Int variable) in a Core.
can we share the communication between two core, core==>reception, core==>transmission with synchronization.

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: How to synchronize the serial port of ESP32 Dual Core

Postby ESP_Sprite » Sun Jan 20, 2019 9:11 am

Please go back a little bit and describe the problem, as I can't really make heads or tails of what you want. You want to send and receive something, but you're saying there's 'insufficient loop time'? What protocol are you trying to speak, and what specific timing (between what and what) can you not get?

khalil_dz
Posts: 8
Joined: Sat Dec 22, 2018 4:14 pm

Re: How to synchronize the serial port of ESP32 Dual Core

Postby khalil_dz » Sun Jan 20, 2019 3:16 pm

thank you for the answer.
I use Xbee for transmission
the function that I used (in reception Serial.readStringUntil('\r')

the problem:

prog loop time (5ms) insufficient for transmission (6 Int variables) and reception (4 Int variables) on a core, it can not process this data in a loop <5 ms.

Who is online

Users browsing this forum: PepeTheGreat and 47 guests