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

temperature module NRF51822

Dear nodic engineer:

i want test environment temperature with NRF51822 inner temperature module. any information for reference? any temp graph? if need calibration? if need extra temp sensor?

kind regards

kevin

Parents
  • hi Ole Morten:

            thank you for your great support.
    
            i have tested nrf6310\temperature_example. at  30(Celsius)
            
            I checked the data.   NRF_TEMP=0x000002AF;   TEMP=0xFFFFFFAC;  
            what's the NRF_TEMP data type? 10bit 2's complement  or 32bit 2's complement? 
           which position is for sign(+/-)?
            result=10 =  10* 0.25 celsius.right?
           how to work out the result of die temperature?
    

    int main(void) { int32_t volatile temp; int32_t temp_valve;

    nrf_temp_init();
    nrf_gpio_range_cfg_output(8, 15);
    
    while(true)
    {       
        NRF_TEMP->TASKS_START = 1;
        while ((NRF_TEMP->EVENTS_DATARDY & TEMP_INTENSET_DATARDY_Msk) != (TEMP_INTENSET_DATARDY_Set << TEMP_INTENSET_DATARDY_Pos))
        {
        }
        NRF_TEMP->EVENTS_DATARDY = 0;
        temp = (nrf_temp_read()/4);
        NRF_TEMP->TASKS_STOP = 1; /* Stop the temperature measurement */
    
        nrf_gpio_port_write(NRF_GPIO_PORT_SELECT_PORT1, (uint8_t)(temp));
    
        nrf_delay_ms(500);
    }
    

    }

    kind regards

    kevin chen

    from china

Reply
  • hi Ole Morten:

            thank you for your great support.
    
            i have tested nrf6310\temperature_example. at  30(Celsius)
            
            I checked the data.   NRF_TEMP=0x000002AF;   TEMP=0xFFFFFFAC;  
            what's the NRF_TEMP data type? 10bit 2's complement  or 32bit 2's complement? 
           which position is for sign(+/-)?
            result=10 =  10* 0.25 celsius.right?
           how to work out the result of die temperature?
    

    int main(void) { int32_t volatile temp; int32_t temp_valve;

    nrf_temp_init();
    nrf_gpio_range_cfg_output(8, 15);
    
    while(true)
    {       
        NRF_TEMP->TASKS_START = 1;
        while ((NRF_TEMP->EVENTS_DATARDY & TEMP_INTENSET_DATARDY_Msk) != (TEMP_INTENSET_DATARDY_Set << TEMP_INTENSET_DATARDY_Pos))
        {
        }
        NRF_TEMP->EVENTS_DATARDY = 0;
        temp = (nrf_temp_read()/4);
        NRF_TEMP->TASKS_STOP = 1; /* Stop the temperature measurement */
    
        nrf_gpio_port_write(NRF_GPIO_PORT_SELECT_PORT1, (uint8_t)(temp));
    
        nrf_delay_ms(500);
    }
    

    }

    kind regards

    kevin chen

    from china

Children
No Data
Related