Temperature Sensor Calibration

Temperature Sensor Calibration

The PTX1xxR comes with an on-chip temperature sensor, which continuously monitors the die temperature. If the temperature exceeds a configurable threshold, the transmitter shouts down automatically. This is called the shutdown-temperature, which must be configured only once during production. Calibration is done by the SDK, based on two values:

  • shutdown temperature - the desired temperature (in Celsius), above which the transmitter will shut down

  • ambient temperature - the ambient temperature of the IC during calibration (in Celsius), this must be the precise value of the actual ambient temperature

The raw temperature value will be calculated by the SDK and the resulting value must be used after every power on thereafter. This can be achieved by persistently storing the raw value (in code or EEPROM for example).

This example is taken from the OS IOT Reader SDK from ptx_IOT_RD_Main.c , but it also applies to the non-OS and POS variants, with possible minor differences.

Calculating the raw value:

/* * Example of using Temperature calibration function. * * Do Temperature Sensor Calibration: * Tamb = 25 degree C * Tshtdown = 100 degree C * * Temperature sensor calibration has to be performed only once for the given PTX1K IC component. * The resulting calibrated thermal shutdown value should be stored for future use. * For every further system power up, it is only required to use that value in a call to ptxIoTRd_Init_NSC. */ if(1u == temperature_sensor_calibration) { uint8_t Tshtdown = 100u; uint8_t Tambient = 25u; ptxCommon_PrintF ("Temperature sensor calibration at Tamb = %d, expected Tshtdown = %d ...", Tambient, Tshtdown); st = ptxIoTRd_TempSensor_Calibration (stack_comp, Tambient, &Tshtdown); if(PTX_STATUS_OK == st) { ptxCommon_PrintF ("SUCCESS. \n"); ptxCommon_PrintF ("Compensated threshold for the shutdown: Tshtdown = %d. \n", Tshtdown); app_thermal_shutdown = Tshtdown; temperature_sensor_calibration = 0; } else { ptxCommon_PrintF ("FAILED. \n"); } }

Using the calculated raw value:

/* * Initialize and configure NFC hardware. * * NOTE: here we intentionally overwrite the status of the former call to enable RT logging because * logging functionality is not crucial for loopback test. */ nsc_init_config.CalibratedTempThreshold = app_thermal_shutdown; /* Read RF-Configuration from .dat-File (Note: RfConfigParameter is optional; NULL means to read from file) */ nsc_init_config.RfConfigParameter = NULL; st = ptxIoTRd_Init_NSC(stack_comp, &nsc_init_config);