-->
Page 1 of 1

Unable to get Debugging info on UART1

PostPosted: Tue Jun 25, 2019 10:52 am
by maverickchongo
Hi,

I am in real need to get live debugging data while my program runs, but can only do throught UART0, it doesn't come through UART1 when I configure it to do so.

This is my uart init so it does dump the os_printfs on UART1:
Code: Select allvoid ICACHE_FLASH_ATTR
uart_init(UartBautRate uart0_br, UartBautRate uart1_br, DataRxCb aRxCb)
{
    // Record callback to push out uart0 data
    rxCb = aRxCb;

    /*this is a example to process uart data from task,please change the priority to fit your application task if exists*/
    system_os_task(uart_recvTask, uart_recvTaskPrio, uart_recvTaskQueue, uart_recvTaskQueueLen);  //demo with a task to process the uart data
   
    UartDev.baut_rate = uart0_br;
    uart_config(UART0);
    UartDev.baut_rate = uart1_br;
    uart_config(UART1);
    ETS_UART_INTR_ENABLE();
   
    #if UART_BUFF_EN
    pTxBuffer = Uart_Buf_Init(UART_TX_BUFFER_SIZE);
    pRxBuffer = Uart_Buf_Init(UART_RX_BUFFER_SIZE);
    #endif

    system_set_os_print(1);

    os_install_putc1((void *)uart1_write_char); //use this one to output debug information via uart1 //


    /*option 1: use default print, output from uart0 , will wait some time if fifo is full */
    //do nothing...

    /*option 2: output from uart1,uart1 output will not wait , just for output debug info */
    /*os_printf output uart data via uart1(GPIO2)*/
    //os_install_putc1((void *)uart1_write_char);    //use this one to output debug information via uart1 //

    /*option 3: output from uart0 will skip current byte if fifo is full now... */
    /*see uart0_write_char_no_wait:you can output via a buffer or output directly */
    /*os_printf output uart data via uart0 or uart buffer*/
    //os_install_putc1((void *)uart0_write_char_no_wait);  //use this to print via uart0
   
    #if UART_SELFTEST&UART_BUFF_EN
    os_timer_disarm(&buff_timer_t);
    os_timer_setfn(&buff_timer_t, uart_test_rx, NULL);   //a demo to process the data in uart rx buffer
    os_timer_arm(&buff_timer_t,10,1);
    #endif
}


All I ever get on UART1 is the below when the program crashes:

ets Jan 8 2013,rst cause:1, boot mode:(3,7)

load 0x40100000, len 28436, room 16
tail 4
chksum 0xf8
load 0x3ffe8000, len 2508, room 4
tail 8
chksum 0x90
load 0x3ffe89d0, len 17372, room 0
tail 12
chksum 0xb3
csum 0xb3

I would be really greatefull if someone would point out what might be the problem.

Thanks in advance