Hello,
I'm using RTOS 1.4 and I'm stuck trying to use UART1 for debugging purposes.
I added the uart driver provided with the SDK but I cannot see the function to make the UART1 work. This is the content of my user_init function:
void user_init(void)
{
uart_init_new();
UART_SetBaudrate(UART0,BIT_RATE_115200);
printf("\n\r\nSDK version: %s\n", system_get_sdk_version());
printf("Chip ID: 0x%x\n", system_get_chip_id());
}
Which is the instruction to send info through the UART1???...OS_PRINT???
Thanks in advance!
UART1 TX
-
- Posts: 11
- Joined: Wed Apr 27, 2016 4:22 pm
Re: UART1 TX
Postby hualaonanxiaoniao » Wed Apr 27, 2016 4:29 pm
you should see the asscication documents,the name is sdk_programming_guide,in that can found how to make the uart1 as debug function
and that is my demo ,you can see it;
uart_init(BIT_RATE_115200, BIT_RATE_115200);
os_install_putc1((void *)uart1_write_char);//this is use uart1 for debug infomations.
and that is my demo ,you can see it;
uart_init(BIT_RATE_115200, BIT_RATE_115200);
os_install_putc1((void *)uart1_write_char);//this is use uart1 for debug infomations.
Re: UART1 TX
Postby jhinkle » Thu Apr 28, 2016 12:44 am
I did not want to touch UART0 since my GDB stubb was using it.
This is how I implemented UART1
Hope that helps
This is how I implemented UART1
Code: Select all
UART_ConfigTypeDef uart_config;
uart_config.baud_rate = BIT_RATE_115200;
uart_config.data_bits = UART_WordLength_8b;
uart_config.parity = USART_Parity_None;
uart_config.stop_bits = USART_StopBits_1;
uart_config.flow_ctrl = USART_HardwareFlowControl_None;
uart_config.UART_RxFlowThresh = 120;
uart_config.UART_InverseMask = UART_None_Inverse;
UART_ParamConfig(UART1, &uart_config);
UART_SetPrintPort(UART1);
Hope that helps
Who is online
Users browsing this forum: No registered users and 14 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.