Fujitsu MB95210H Series Application Note page 12

8-bit microcontroller, how to use dbg pin
Hide thumbs Also See for MB95210H Series:
Table of Contents

Advertisement

//set DBG pin as EC0 pin
void p12_as_ec0(void)
{
SYSC = 0xE3;
T00CR0 = 0x71;
TMCR0 = 0x43;
T00DR = 0x08;
T00CR1 = 0x81;
}
//change EC0 pin to P04
void p04_as_ec0(void)
{
SYSC = 0xEB;
T00CR0 = 0x71;
TMCR0 = 0x43;
T00DR = 0x08;
T00CR1 = 0x81;
}
//main function
void
main(void)
{
gpio_setting();
...
#ifdef DEBUGMODE
P04_as_ec0();
#else
P12_as_ec0();
#endif
}
DBG pin operation V1.0
Chapter 5 Sample code
// set P12 as EC0 pin, disable HCLK1
// interval timer, external clock source.
// 8bit mode, output timer00.
// set counter.
// enable output, start timer00.
// set P04 as EC0 pin, disable HCLK1
// interval timer, external clock source.
// 8bit mode, output timer00.
// set counter.
// enable output, start timer00.
//pull low P12 pin
//set P04 as EC0 pin in debug mode
//set P12 as EC0 pin in free run mode
MCU-AN-500009-E-10 – Page 12

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb95200h seriesF2mc-8fx series

Table of Contents