ARM Technical Support Knowledge Articles

GENERATE ENWDT INSTRUCTION

Applies to: C166 C Compiler

Answer


Information in this article applies to:


QUESTION

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

ANSWER

The C166 Version 5 has an 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

Article last edited on: 2005-07-15 10:01:50

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential