how could using UART0 in RTOS SDK???

marhc_seven
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

marhc_seven
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!!!!!

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 ~~~~~

marhc_seven
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

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   !!!
}

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: how could using UART0 in RTOS SDK???

Postby ESP_Faye » Tue Oct 27, 2015 11:50 am

Hi,

Please try to use "printf" to print logs.

Thanks for your interest in ESP8266 !

marhc_seven
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!!!

Who is online

Users browsing this forum: No registered users and 27 guests