Page 1 of 1

BlueTooth crash -> UART2

Posted: Sun Feb 19, 2023 10:30 pm
by ThomasK
Hello,
I have a problem - Chip is ESP32-PICO-V3 (revision 3):
When I use UART2 it only works when Bluetooth is not active. When BT is activated, no more data comes via UART2.
Communication runs normally via UART0.
I need to realize the following:
- Communication "CONSOLE" can work
- Communication "IRDA" must work
"CONSOLE" is the "Serial" function which runs over UART0 by default. "IRDA" is the "Serial2" function over UART2

I tried the following to swap the two UART functions:
#include <HardwareSerial.h>

#if IRDA_NR == 0
HardwareSerial CONSOLE(2);
HardwareSerial IRDA(0);
#endif
#if IRDA_NR == 2
HardwareSerial CONSOLE(0);
HardwareSerial IRDA(2);
#endif

void setup()
{
CONSOLE.begin(115200,SERIAL_8N1,RXD0,TXD0);
IRDA.begin(115200,SERIAL_8N1,RXD2,TXD2);
....
This works in principle, but as soon as BT is activated, IRDA no longer runs, regardless of whether IRDA_NR == 0 or IRDA_NR == 2 is set.
What is wrong? Did I forgot something? Is there a better suggestion? :?
Best regards
Thomas

Re: BlueTooth crash -> UART2

Posted: Sat Mar 04, 2023 11:21 am
by sgiba73
Having exactly the same problem.
Did you configure out how to fix that problem ?

Regards,
sgiba73

Re: BlueTooth crash -> UART2

Posted: Sun Mar 05, 2023 10:57 am
by ThomasK
I don't have a solution yet. When the BT is active, no more data can be received... maybe there is a collision in the interrupt setting. If anyone has an idea for a solution, that would be great.