nRF9160 receives garbage data on UART sometimes

Hello, 

I closed below case by mistake. 

nRF9160 receives garbage data on UART sometimes - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com)

As per your query I am using nRF9160 DK for testing. 

I have modified "http_application_uodate" example code for my testing. 

Regards,

Smitesh Mali

Parents
  • Hello, 

    Can you please elaborate on what you have modified on the nRF9160: HTTP application update sample? What terminal are you using to connect to the COM port? Have you tried with the nRF Connect for Desktop - LTE Link Monitor?

    Kind regards,
    Øyvind

  • Hello,

    Below is the interrupt routine which waits for "UUT*SIM=?\n" command from terminal. 

    static void UHi_PcUartCb(const struct device *x, void* data)
    {
        uart_irq_update(x);
        int data_length = 0;
    
        if (uart_irq_rx_ready(x)) {
                data_length = uart_fifo_read(x, &_uartPcRxChar, 1);
    
        }
    
        if (_pcCmdRxFlg)
        {
            return;
        }
    
        _uartPcBuf[_pcRxCntr] = _uartPcRxChar;
    
        if (_uartPcBuf[_pcRxCntr] == '\n')
        {
            _pcCmdRxFlg = true;
            return;
        }
    
        _pcRxCntr++;
    
    }

    When "\n" is receive data will be processed. 

    But sometimes data received is "ª*SIM=?\n" instead of "UUT*SIM=?\n". 

    What terminal are you using to connect to the COM port?

    I am using "Docklight" utility in PC to communicate with com port. 

    Have you tried with the nRF Connect for Desktop - LTE Link Monitor?

    No, I haven't tried it. 

    Regards,

    Smitesh Mali

Reply
  • Hello,

    Below is the interrupt routine which waits for "UUT*SIM=?\n" command from terminal. 

    static void UHi_PcUartCb(const struct device *x, void* data)
    {
        uart_irq_update(x);
        int data_length = 0;
    
        if (uart_irq_rx_ready(x)) {
                data_length = uart_fifo_read(x, &_uartPcRxChar, 1);
    
        }
    
        if (_pcCmdRxFlg)
        {
            return;
        }
    
        _uartPcBuf[_pcRxCntr] = _uartPcRxChar;
    
        if (_uartPcBuf[_pcRxCntr] == '\n')
        {
            _pcCmdRxFlg = true;
            return;
        }
    
        _pcRxCntr++;
    
    }

    When "\n" is receive data will be processed. 

    But sometimes data received is "ª*SIM=?\n" instead of "UUT*SIM=?\n". 

    What terminal are you using to connect to the COM port?

    I am using "Docklight" utility in PC to communicate with com port. 

    Have you tried with the nRF Connect for Desktop - LTE Link Monitor?

    No, I haven't tried it. 

    Regards,

    Smitesh Mali

Children
Related