This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

temperature measurement code in Generic



Where I can put this code in the GenericApp to measure temperature, please i need this:

TR0 | = 0x01, / / ​​Must be modified prior TR0 to ATEST,
ATEST | = 0x01 / / P0_0 and P0_1 Otherwise Forced with 0
uint16 tempSample = HalAdcRead (HAL_ADC_CHN_TEMP, HAL_ADC_RESOLUTION_12);
TR0 & = ~ 0x01;
ATEST & = ~ 0x01;