UART sends only Mojibake

ad_app22
Posts: 2
Joined: Wed Mar 29, 2017 7:52 pm

UART sends only Mojibake

Postby ad_app22 » Tue Apr 18, 2017 8:46 pm

Hi ESP guys,

As a newbie of ESP32, I am working on setting up the UART as the debug interface of my board based on WROOM02, which has actually a ESP32 core. Both UARTs are connected via FTDI to USB and can be recognized as COM ports under Windows.

I have taken ESP8266_NONOS_SDK\examples\IoT_Demo as my starting point and chosen
no boot,
generate bin: eagle.flash.bin+eagle.irom0text.bin,
spi speed: 40 MHz,
spi mode: QIO,
spi size: 2048KB, and
spi ota map: 512KB + 512KB.

Well almost everything as default. And accordingly
#define PRIV_PARAM_START_SEC 0x7C
#define ESP_PARAM_START_SEC 0x7D

Compilation succeeds and flashing as well
eagle.flash.bin@0x00000
eagle.irom0text.bin@0x10000

Besides, I simply initialize the UART at the very beginning of user_init():
os_delay_us(1000000);
uart_init_2(BIT_RATE_115200, BIT_RATE_115200);
os_delay_us(1000000);
while(1)
{
uart_tx_one_char_no_wait(UART0, 'a');
uart_tx_one_char_no_wait(UART1, 'b');
}

I take uart_init_2, since it explicitly assigns the UART parameters like parity stop bit, etc.

However, after flashing and cycling power of my board, I can receive
nothing from UART1 and
Mojibake from UART0.

It would be nice, if someone could help me. Any suggestion is appreciated.

BR
AD

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

Re: UART sends only Mojibake

Postby ESP_Sprite » Wed Apr 19, 2017 1:34 am

Erm, are you trying to compile ESP32 stuff using the ESP8266 toolchain/SDK? That's not going to work, compiling stuff for the ESP32 needs the ESP32 toolchain and esp-idf as a sdk.

ad_app22
Posts: 2
Joined: Wed Mar 29, 2017 7:52 pm

Re: UART sends only Mojibake

Postby ad_app22 » Wed Apr 19, 2017 7:27 pm

Thanks a lot for your prompt reply and great hint!

I think I have landed in the wrong forum.
WROOM02 is based on ESP8266, which is a single core processor,
while ESP32 a dual core processor.

Fortunately I have followed the correct tutorial and taken a correct example project. For further question I think I need to turn to another forum.

Thanks again!

Who is online

Users browsing this forum: jsmith56x and 294 guests