how could using UART0 in RTOS SDK???
-
- Posts: 44
- Joined: Sat Oct 17, 2015 4:49 pm
how could using UART0 in RTOS SDK???
Postby marhc_seven » Mon Oct 26, 2015 4:23 pm
it seems that there is not any uart sending string funtion in RTOS SDK?
how could i send string output from the UART0 ????
BR
how could i send string output from the UART0 ????
BR
-
- Posts: 44
- Joined: Sat Oct 17, 2015 4:49 pm
Re: how could using UART0 in RTOS SDK???
Postby marhc_seven » Mon Oct 26, 2015 5:03 pm
i am using the os_printf but there is nothing output from the uart!!!!!
/* NOTE: don't use printf_opt in irq handler, for test */
#define os_printf(fmt, ...) do { \
static const char flash_str[] ICACHE_RODATA_ATTR STORE_ATTR = fmt; \
printf(flash_str, ##__VA_ARGS__); \
} while(0)
#endif /* __LIBC_H__ */
the uart0 always put 0x00 ~~~~~
Code: Select all
static void RAMFUNC LEDBlinkTask(void *pvParameters)
{
PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0TXD_U, FUNC_GPIO1);
for (int tick = 0;; tick++)
{
vTaskDelay(s_LEDPeriod / portTICK_RATE_MS);
gpio_output_conf(0, BIT1, BIT1, 0);
vTaskDelay(s_LEDPeriod / portTICK_RATE_MS);
gpio_output_conf(BIT1, 0, BIT1, 0);
}
os_printf("aaaaaa\n");
}
/* NOTE: don't use printf_opt in irq handler, for test */
#define os_printf(fmt, ...) do { \
static const char flash_str[] ICACHE_RODATA_ATTR STORE_ATTR = fmt; \
printf(flash_str, ##__VA_ARGS__); \
} while(0)
#endif /* __LIBC_H__ */
the uart0 always put 0x00 ~~~~~
-
- Posts: 44
- Joined: Sat Oct 17, 2015 4:49 pm
Re: how could using UART0 in RTOS SDK???
Postby marhc_seven » Mon Oct 26, 2015 7:07 pm
i have creat a task ! which could be blink the led again and again.
and i have always add the uart0 sending function in it, but it doesn't work
and i have always add the uart0 sending function in it, but it doesn't work
Code: Select all
static void RAMFUNC LEDBlinkTask(void *pvParameters)
{
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U, FUNC_GPIO2);
for (int tick = 0;; tick++)
{
vTaskDelay(s_LEDPeriod / portTICK_RATE_MS);
gpio_output_conf(0, BIT2, BIT2, 0);
vTaskDelay(s_LEDPeriod / portTICK_RATE_MS);
gpio_output_conf(BIT2, 0, BIT2, 0);
}
os_putc(0x09); //no work !!!
//uart_tx_one_char(UART0, 'a'); // no work !!!
//os_printf("aaaaaa\n"); // No work !!!
}
-
- Posts: 44
- Joined: Sat Oct 17, 2015 4:49 pm
Re: how could using UART0 in RTOS SDK???
Postby marhc_seven » Tue Oct 27, 2015 3:11 pm
sorry, i need to sending the data from uart0 !!!
be aware of no only printf for debug!!!
be aware of no only printf for debug!!!
Who is online
Users browsing this forum: No registered users and 27 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.