The CMPSS has two sources of offset errors: comparator offset error and compdac offset error. In the data sheet the comparator offset error is referred to as Input referred offset error and compdac offset error is referred to as Static offset error. If both inputs of the comparator are driven from a pin, only the comparator offset error applies. However if the inverting input of the comparator is driven from the compdac, then only the compdac offset error applies. This is because the compdac offset error includes comparator offset error. Due to the offset errors, the CMPSS must be calibrated to make sure trips happen at the expected levels.
This example shows the calibration of CMPSS when the negative input of the comparator is driven from the compdac. CMPSSA1 COMPH comparator is enabled for calibration. CMPIN1P is used to give positive input coming from the DAC and Compdac is configured to provide the negative input. DAC is used to provide different voltage values to CMPIN1P. Compdac is configured to provide signal of 4095 and will decrement till CMPSS latch is set for that specific voltage value at positive input.
Output will be the measured voltages at which CMPSS latch is set when compared with different DAC value including the compdac offset error. Please refer the datasheet for the allowed compdac offset error.
When using AM263x-CC with TMDSHSECDOCK (HSEC180 controlCARD Baseboard Docking Station)
When using AM263x-LP
Parameter | Value |
---|---|
CPU + OS | r5fss0-0 nortos |
Toolchain | ti-arm-clang |
Boards | am263px-cc, am263px-lp |
Example folder | examples/drivers/cmpss/cmpss_calibration/ |
Shown below is a sample output when the application is run,