This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

No RX on UART

Hi,

I'm using 51822 to control GSM module via UART (57600, no flow control). My device is USB and battery powered. After I program the chip I HAVE to disconnect all the power in order to start system clean and have it working. If I don't completely remove power on start nrf will send commands to GSM module, GSM module will recognize them and send a reply to nrf, but nrf won't get anything on RX (I'm using simple UART without interrupt and without softdevice).

What could it be? I also don't use 32khz xtal, so it synthesises clock from hf crystal.

Parents
  • uint32_t error;
           if(NRF_UART->EVENTS_ERROR !=0)
           {
                NRF_UART->EVENTS_ERROR = 0;
                error = NRF_UART->ERRORSRC;
                NRF_UART->ERRORSRC = error;
    
    // flush the RX FIFO by reading and ignoring them
    
     
    
       while (NRF_UART->EVENTS_RXDRDY != 0) 
        { 
            error = NRF_UART->RXD; 
            NRF_UART->EVENTS_RXDRDY = 0;
            //Give a moment for more data in FIFO to move into RXD register
            nrf_delay_ms(1);
        }
       }
    
Reply
  • uint32_t error;
           if(NRF_UART->EVENTS_ERROR !=0)
           {
                NRF_UART->EVENTS_ERROR = 0;
                error = NRF_UART->ERRORSRC;
                NRF_UART->ERRORSRC = error;
    
    // flush the RX FIFO by reading and ignoring them
    
     
    
       while (NRF_UART->EVENTS_RXDRDY != 0) 
        { 
            error = NRF_UART->RXD; 
            NRF_UART->EVENTS_RXDRDY = 0;
            //Give a moment for more data in FIFO to move into RXD register
            nrf_delay_ms(1);
        }
       }
    
Children
No Data
Related