How do LX6 Cores of ESP32 share Serial Port

GolamMostafa
Posts: 19
Joined: Sun Jul 23, 2023 12:30 am

How do LX6 Cores of ESP32 share Serial Port

Postby GolamMostafa » Sun Jul 23, 2023 2:41 am

I know that there are two LX6 Processor Cores inside the ESP32 chip. I would like to get a diagram similar to the attached diagram (it is my idea) to see the sharing mechanism of ESP32's UART0 Port for onward connection to the OutputBox of the Arduino Serial Monitor.
ESP32UartController.png
ESP32UartController.png (20.9 KiB) Viewed 1249 times

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

Re: How do LX6 Cores of ESP32 share Serial Port

Postby ESP_Sprite » Sun Jul 23, 2023 3:25 am

Both cores are connected to the internal APB bus that goes to the UART. The APB bus makes sure register writes to the peripherals are serialized (as in: only one request can be sent over the bus at a time), but aside from that, both cores can happily access all UART registers at all times.

GolamMostafa
Posts: 19
Joined: Sun Jul 23, 2023 12:30 am

Re: How do LX6 Cores of ESP32 share Serial Port

Postby GolamMostafa » Sun Jul 23, 2023 12:09 pm

Does this APB (Advanced Peripheral Bus) contains --
Address Lines (how many -- 32?)
Data lines ? (how many -- 32?)
Read/write, IO-M Control lines?

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

Re: How do LX6 Cores of ESP32 share Serial Port

Postby ESP_Sprite » Sun Jul 23, 2023 12:59 pm

It's a standard - you can read the spec here. In our case DATA_WIDTH is 32 bit, and I assume ADDR_WIDTH also is 32 bit.

GolamMostafa
Posts: 19
Joined: Sun Jul 23, 2023 12:30 am

Re: How do LX6 Cores of ESP32 share Serial Port

Postby GolamMostafa » Sun Jul 23, 2023 2:39 pm

Thanks! I am gaining slowly better insight about the architecture of LX6 Processor of the ESP32 system.

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

Re: How do LX6 Cores of ESP32 share Serial Port

Postby MicroController » Sun Jul 23, 2023 10:58 pm

GolamMostafa wrote:
Sun Jul 23, 2023 2:41 am
to see the sharing mechanism of ESP32's UART0 Port
It may or may not be relevant to you that the UART driver also uses synchronization primitives (semaphores/mutexes) in software to coordinate access to the peripheral between tasks.

Who is online

Users browsing this forum: No registered users and 98 guests