Cypress F2MC-8FX Series Nota de aplicação - Página 13
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 . 2
P r o j e c t N a m e : H W W D T
Hardware watchdog
main.c
#include "mb95200.h"
/* Hardware watchdog timer starts automatically after a reset and cannot be stopped */
/* The internal time is fixed to 2
/*---------------------------------------------------------------------------
name: Delay();
function: delay function
-----------------------------------------------------------------------------*/
void Delay (unsigned int i)
{
while(i--)
{
}
}
/*---------------------------------------------------------------------------
name: main();
function: main loop
-----------------------------------------------------------------------------*/
void main(void)
{
PDR0_P05 = 0;
DDR0_P05 = 1;
while(1)
{
}
}
www.cypress.com
asm("\tNOP");
PDR0_P05 = ~PDR0_P05;
Delay (500);
WDTC |= 0x05;
Document No. 002-05336 Rev.*A
F²MC-8FX Family, MB95200H/210H Series Watchdog Timer
16
/F
CRL
// initial value
// set P05 as output
// show program is normal run
// clear WDT timer within a certain amount of time
*/
12