Cypress F2MC-8FX Series Nota de aplicação - Página 11
Procurar online ou descarregar pdf Nota de aplicação para Microcontroladores Cypress F2MC-8FX Series. Cypress F2MC-8FX Series 16 páginas. How to make on-board debug
Também para Cypress F2MC-8FX Series: Como fazer (14 páginas)
6.1
Sample Code
6 . 1 . 1
P r o j e c t N a m e : S W W D T
Software watchdog timer
main.c
#include "mb95200.h"
/*---------------------------------------------------------------------------
name: Delay();
function: delay function
-----------------------------------------------------------------------------*/
void Delay (unsigned int i)
{
while(i--)
{
}
}
/*---------------------------------------------------------------------------
name: InitWDT();
function: initial watchdog timer
-----------------------------------------------------------------------------*/
void InitCompTimer (void)
{
WDTC = 0x05;
}
/*---------------------------------------------------------------------------
name: main();
function: main loop
-----------------------------------------------------------------------------*/
void main(void)
{
PDR0_P05 = 0;
DDR0_P05 = 1;
InitWDT ();
www.cypress.com
asm("\tNOP");
// set count clock is 2
// start WDT counter
// initial value
// set P05 as output
Document No. 002-05336 Rev.*A
F²MC-8FX Family, MB95200H/210H Series Watchdog Timer
21
/F
CH
10