Hi there,
I'm looking for an information I couldn't find after an hour of investigating.
The EPSLOG uses by default the UART0 which also is the only UART on the board I've to dev for.
Is it possible to also use the UART0 for our own purpose besides the ESPLOG?
I played a bit with the UART functions like
setting up with uart_config_t uart_config = {...} and uart_param_config(0, &uart_config)
installing the UART driver with uart_driver_install(...),
getting the information like using uart_is_driver_installed(...) to figure things out a bit.
I saw that though the ESPLOG uses the UART0, uart_is_driver_installed(...) did return that UART0 is not active, I had to first call uart_driver_install(...) so UART0 was told active.
And this leads me to the question, do I interfere somehow with whatever the ESPLOG sets up for the UART0?
Thanks and best regards.
ESPLOG and UART0 coexistance for own use
-
- Posts: 9759
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESPLOG and UART0 coexistance for own use
What in particular do you want to use it for? If simply to print stuff, printf() works, or you can install the UART driver and use the UART functions. If you want to re-use the serial connection for other purposes, you can initialize e.g. UART1 to use the UART0 Tx/Rx pin and it'll 'take over' that port.
Re: ESPLOG and UART0 coexistance for own use
Hi, just to print some information or give a little service interface over it.
I'm wondering, why is the UART0 not active (when calling uart_is_driver_installed(...) ) unless installing myself the driver prior? I thought it would have been already done by the ESP IDF, since the ESP_LOG system uses the UART0.
I'm wondering, why is the UART0 not active (when calling uart_is_driver_installed(...) ) unless installing myself the driver prior? I thought it would have been already done by the ESP IDF, since the ESP_LOG system uses the UART0.
-
- Posts: 9759
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESPLOG and UART0 coexistance for own use
The uart *driver* is not active at that point; the UART itself is used (otherwise you wouldn't have output) but output is handled by some more primitive IO routines in ROM.
Who is online
Users browsing this forum: No registered users and 121 guests