CMP interruption

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

CMP interruption

251 Views
ahmedhrabi
Contributor III

Hello Everyone, 

I'am using the CMP0 on the K64. I used the driver sample code for cmp driver on the latest SDK (2.8). 

 

Configuration: 

  • INP: DAC 1.65V (VOSEL 32)
  • INM : CH5 , the input is a 50hz AC signal centred on 1.65V
  • Interruption : Only rising edge enabled

 

Expectations: 

  • Interruption every 20ms (1/50hz) on rising edge with rising flag only on the SCR register. 

 

Real Results: 

  • The first interruption is always erroned (even when i added a delay of 5ms after initilisaion) 
  • The rest of the interruptions are called every 20ms on rising edge but with the two flags setted (rising and falling ) on the SCR register ! (SCR_CFR = 1 ,  SCR_CFF = 1)

 

Best Regards. 

0 Kudos
0 Replies