ESP32-C3 UART IRDA support
Posted: Sun May 22, 2022 10:06 pm
Hi
i am trying to implement a project that involves IRDA data communication.
In all the docs it is stated, that the ESP32 UART can be configured to act as IRDA encoder/decoder and directly control an IRDA tranceiver. Based on that I did my design.
Now either me or the ESP-Software have some flaws.
I got inspired by this post: viewtopic.php?t=2766
and did this:
void setup() {
pinMode(0,OUTPUT);
digitalWrite(0, HIGH);
Serial.begin(115200);
USBSerial.begin(115200);
WRITE_PERI_REG( 0x3FF40020 , READ_PERI_REG(0x3FF50020) | (1<<16 ) | (1<<10 ) ); //UART_IRDA_EN + UART_IRDA_TX_EN
for (uint8_t n = 0;n<10; n++) {
Serial.printf("UART-OK[%d] ", n);
USBSerial.printf("USB-OK[%d] ", n);
delay(500);
if (!(n&0x7)){
Serial.println();
USBSerial.println();
}
}
As soon as I include the WRITE_PERI_REG call, the result is a boot loop, no mater what I try:
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xa (SPI_FAST_FLASH_BOOT)
Saved PC:0x403818be
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x438
load:0x403ce000,len:0x90c
load:0x403d0000,len:0x2358
SHA-256 comparison failed:
Calculated: a9753a4fc647c6545c1b919ef08db429130a48592727edca270f1e5a3da0d0a9
Expected: 3bf6ef2cf3b9eefcd4b3c70cc5d1ce5138292d101a5cb1d5db6fbebf081b0a19
Attempting to boot anyway...
entry 0x403ce000
What is wrong here? A bug? Me?
Any input highly appreciated.
Regards
Thomas
i am trying to implement a project that involves IRDA data communication.
In all the docs it is stated, that the ESP32 UART can be configured to act as IRDA encoder/decoder and directly control an IRDA tranceiver. Based on that I did my design.
Now either me or the ESP-Software have some flaws.
I got inspired by this post: viewtopic.php?t=2766
and did this:
void setup() {
pinMode(0,OUTPUT);
digitalWrite(0, HIGH);
Serial.begin(115200);
USBSerial.begin(115200);
WRITE_PERI_REG( 0x3FF40020 , READ_PERI_REG(0x3FF50020) | (1<<16 ) | (1<<10 ) ); //UART_IRDA_EN + UART_IRDA_TX_EN
for (uint8_t n = 0;n<10; n++) {
Serial.printf("UART-OK[%d] ", n);
USBSerial.printf("USB-OK[%d] ", n);
delay(500);
if (!(n&0x7)){
Serial.println();
USBSerial.println();
}
}
As soon as I include the WRITE_PERI_REG call, the result is a boot loop, no mater what I try:
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xa (SPI_FAST_FLASH_BOOT)
Saved PC:0x403818be
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x438
load:0x403ce000,len:0x90c
load:0x403d0000,len:0x2358
SHA-256 comparison failed:
Calculated: a9753a4fc647c6545c1b919ef08db429130a48592727edca270f1e5a3da0d0a9
Expected: 3bf6ef2cf3b9eefcd4b3c70cc5d1ce5138292d101a5cb1d5db6fbebf081b0a19
Attempting to boot anyway...
entry 0x403ce000
What is wrong here? A bug? Me?
Any input highly appreciated.
Regards
Thomas