UART sends only Mojibake
Posted: Wed Apr 19, 2017 2:51 pm
Hi ESP guys,
As a newbie of ESP8622, I am working on setting up the UART as the debug interface of my board based on WROOM02, which has actually a ESP8622 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.
The Hw should be of no problem. My Hw colleague tested the UARTs with a single Arduino project.
It would be nice, if someone could help me. Any suggestion is appreciated.
BR
AD
As a newbie of ESP8622, I am working on setting up the UART as the debug interface of my board based on WROOM02, which has actually a ESP8622 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.
The Hw should be of no problem. My Hw colleague tested the UARTs with a single Arduino project.
It would be nice, if someone could help me. Any suggestion is appreciated.
BR
AD