MC9S12C Active Trigger Detection

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

MC9S12C Active Trigger Detection

510 Views
tnriley
Contributor III

What is the mechanism for detecting an active ATD trigger on an MC9S12C device. The port is triggering ok, but I am having trouble detecting the trigger status in software. I would like to know when the trigger is active and also when it is inactive. I am currently attempting to do this with the PORTAD register, (after enabling PTAD7 in ATDDIEN), but this method has not been reliable thus far. Please advise on a better method.

Labels (1)
0 Kudos
Reply
2 Replies

406 Views
lama
NXP TechSupport
NXP TechSupport

Hi

There is no possibility to know trigger status from any special bit. The method you used is OK - I do not understand why you wrote it is not reliable. Maybe you are not informed immediately but only on request. Another method could be connection to another pin with interrupt capability. In this case you are informed almost immediately about trigger change. You can connect the trigger to two pins to be able to check interrupt on rising and falling edge. If you want as immediate response as possible you have to change interrrupt priiority of such event.

Best regards,

Ladislav

406 Views
tnriley
Contributor III

Thanks, I guess that was my real question. I did not see a mechanism to generate an interrupt from the ATD trigger directly. Of course, I can poll the flag pin as stated, but was trying to find a more elegant solution. I can always add additional connections as you suggested, but was just looking for alternatives.

0 Kudos
Reply