Keil Logo

C166: Generate ENWDT Instruction


Information in this article applies to:

  • C166 Version 5

QUESTION

The C166 intrinsic functions support only disabling the watchdog timer via _diswdt_(). But the Infineon XC16x devices have a new ENWDT instruction intrins.h How can I generate a ENWDT instruction in my C code?

ANSWER

The C166 Version 5 has a very powerful in-line assembler. Therefore you may simply add 'intrinsic' functions as you need them.

For ENWDT you may simply use the following statement:

__asm { ENWDT };

A definition of an intrinsic function would look like:

#define _enwdt_()  __asm { ENWDT };

void main (void) {
  _enwdt_ ();
}

MORE INFORMATION


Last Reviewed: Thursday, February 25, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.