Example S32K144 CMP Round-robin S32DS2.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Example S32K144 CMP Round-robin S32DS2.0

Example S32K144 CMP Round-robin S32DS2.0

******************************************************************************************************************
Detailed Description:
The example code shows CMP in Round-robin mode.
CMP is clocked (125kHz) and triggered (80ms) by LPTMR, operates in VLPS.
Input channels are CMP0_IN1 (PTA1), CMP0_IN2 (PTC4), CMP0_IN3 (PTE8), CMP0_IN4 (PTC3).
The initial state of CMP outputs is 0 (Input analog pins < DAC input (Vin1/2))
The input pins are pulled down internally for debugging purposes.
CPM will wake up the MCU if an input has changed.
BLUE LED flashes 1x if CMP_IN1 has changed, 2x CMP0_IN2, 3x CMP0_IN3, 4x CMP0_IN4.
After that, the MCU goes back to VLPS.
-------------------------------------------------------------------------------------------------------------------------------------
Test HW: S32144EVB-Q100X
MCU: S32K144 (0N47T)
Debugger: S32DS2.0, OpenSDA
Target: internal_FLASH
******************************************************************************************************************

Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-1100721%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EExample%20S32K144%20CMP%20Round-robin%20S32DS2.0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1100721%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E******************************************************************************************************************%3CBR%20%2F%3EDetailed%20Description%3A%3CBR%20%2F%3EThe%20example%20code%20shows%20CMP%20in%20Round-robin%20mode.%3CBR%20%2F%3ECMP%20is%20clocked%20(125kHz)%20and%20triggered%20(80ms)%20by%20LPTMR%2C%20operates%20in%20VLPS.%3CBR%20%2F%3EInput%20channels%20are%20CMP0_IN1%20(PTA1)%2C%20CMP0_IN2%20(PTC4)%2C%20CMP0_IN3%20(PTE8)%2C%20CMP0_IN4%20(PTC3).%3CBR%20%2F%3EThe%20initial%20state%20of%20CMP%20outputs%20is%200%20(Input%20analog%20pins%20%26lt%3B%20DAC%20input%20(Vin1%2F2))%3CBR%20%2F%3EThe%20input%20pins%20are%20pulled%20down%20internally%20for%20debugging%20purposes.%3CBR%20%2F%3ECPM%20will%20wake%20up%20the%20MCU%20if%20an%20input%20has%20changed.%3CBR%20%2F%3EBLUE%20LED%20flashes%201x%20if%20CMP_IN1%20has%20changed%2C%202x%20CMP0_IN2%2C%203x%20CMP0_IN3%2C%204x%20CMP0_IN4.%3CBR%20%2F%3EAfter%20that%2C%20the%20MCU%20goes%20back%20to%20VLPS.%3CBR%20%2F%3E-------------------------------------------------------------------------------------------------------------------------------------%3CBR%20%2F%3ETest%20HW%3A%20S32144EVB-Q100X%3CBR%20%2F%3EMCU%3A%20S32K144%20(0N47T)%3CBR%20%2F%3EDebugger%3A%20S32DS2.0%2C%20OpenSDA%3CBR%20%2F%3ETarget%3A%20internal_FLASH%3CBR%20%2F%3E%3CSPAN%3E******************************************************************************************************************%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎12-09-2017 11:22 AM
Updated by: