This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

can we put the nrf(radio) in sleep mode or turn off

hi....

i am using nrf52832 and peripheral device , microcontroller should run continuously , nrf should be in turn off mode and it should turn on when the data need to send in(ble app)

how to do this ?

Parents Reply
  • no , i will assign the threshold value..see the code below for reference

    void timer_sensor_event_handler(void)
    {   
    uint32_t threshold = 32;
     char str[80];
    uint32_t length1;
         char pavi;
    
     char event;
        
      
        
        switch (event)
        {
                 
               
           if(m_sample < threshold)
                {
               length1 = sprintf(str,"%d", m_sample);
                  ble_nus_data_send(&m_nus,str,sizeof(m_sample), m_conn_handle);
                  ret_code_t err_code = nrf_drv_twi_rx(&m_twi, 0x48U, &m_sample, sizeof(m_sample));
                   NRF_LOG_INFO("SUCCESS1");              
                 }
      break;
    
            default:
                //Do nothing.
                break;
      }
    }

Children
No Data
Related