Hi,
I've TWR-S08DC-PT60 daughter board, I need any document/guide which explains about TWR-S08DC-PT60 Labs codes.
Please help me with the document.
Regards
Mithun
Do really exists a TWR-S08DC-PT60_LAB document which is cited on TWR-S08DC-PT60 Quick Start Guide?
More than 3 years later this original question, I was still unable to find it on the Freescale/NXP site nor elsewhere on the web.
I was pretty able to find the sw code project with no explanation on it and it was almost useless untill I succeed to find a video demo at:
http://www.nxp.com/video/an-introduction-to-twr-s08dc-pt60-demo-board:S08P-Eng500_VID
Fortunately the video was enlightening to understand the way of operation of the board with the Demo_lab code on it. In no other way I could imagine how to get information on the status via the PE Terminal Window or how to switch lab1 to lab2 and lab2-1 to lab2-4 through the potentiometer or the different operation of the accelerometer unit.
Really someone at Freescale made so much effort to design such a pretty complex little board with such a complicate demo Lab program without making a short manual on how to operate them? How did other peoples who acquired this board to operate it?
After studying the board schematic diagram also the question on how to connect the TWR_S08DC-PT60 daughter board on the TRW-S08UNIV module does not seem so obvious as in the answer on https://community.freescale.com/message/320591#320591.
In fact on the diagram there are components which may be supplied at +5 or +3.3V, jumpers to be inserted or not and at least 2 resistors which are warned they must be alternately populated in case of connection to 3.3 or 5V:
Really is it all so simple you have to do anything other than remove J10 BKGD jumper?
Salvatore
HI ECKHARD/All,
I've problem with debugging TWR-S08DC-PT60 board, when I was running sample code this was working properly. I wanted to test how Watchdog resets once timeout happens, so enabled WDOG and gave value to TOVAL as below. Once I tried to load this i'm getting attached errors,I'm not getting what mistake I did.... please help me to sort this.
#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */
#define LED0 PORT_PTCD_PTCD0 //O/P Pin
#define LED6 PORT_PTBD_PTBD4 //O/P Pin
#define LED7 PORT_PTBD_PTBD5 //O/P Pin
void MCU_Init(void);
void Peripharals_Init(void);
void main(void) {
_asm SEI; // disable interrupts
MCU_Init(); // Initialize MCU registers
Peripharals_Init();
_asm CLI;
for(;;) {
LED7=0b00100000;
} /* loop forever */
/* please make sure that you never leave main */
}
void MCU_Init(void)
{
//1>Configure Watch dog Timer - disable************************************************
WDOG_CNT = 0xC520U; //Unlock write sequence
WDOG_CNT = 0xD928U; //Unlock write sequence
_asm SEI;
WDOG_TOVAL = 0x0ff;
WDOG_CS2 = 0x01U;
WDOG_CS1 = 0b11100100;
WDOG_WIN = 0; //Must be added as UPDATE = 0
_asm CLI;
//2>:Disable the LVD
PMC_SPMSC1=0b00010101; //LVD reset Enable, LVD Enable, Band gap Buffer Enable
PMC_SPMSC2=0b00000000; //LVD trip low, LVD Warning low
//3>:Enable the BKGD & RESET for the Debugging and STOP for the Low power mode
SYS_SOPT1=0b00001101; //BKGD->Enable, RESET->Enable, STOP->Enable
//4>Clock Source Initialization****************************************************
ICS_C1=0b00000100; // FEI Mode, CLKS=00, RDIV=000, IREFS=1, IRCLKEN=1, IREFSTEN=0
// Clock source=FLL, reference divisor=1, IREFS=1 Interrupt Reference Clock, ICSIRCLK active, ICSIRCLK disable in STOP
ICS_C2_BDIV=0x00; // Go to full bus speed
// Trim Oscillator frequency for 20MHz bus frequency
if(*(unsigned char *far)0xFF6FU != 0xFFU)
{
ICS_C3 = 0x86; // 16mhz 4D @20mHz
ICS_C4 =(unsigned char)((*(unsigned char *far)0xFF6FU) & (unsigned char)0x01U);
}
}
void Peripharals_Init(void)
{
//Steps to Initialize the GPIO
//1>:PORT_PTxD data register to read or write depend upon the configuration of the Pin
//2>:PORT_PTxOE to configure Pin in Output Direction mode
//3>:PORT_PTxIE to configure Pin in Input Direction mode
//Data Register
PORT_PTBD=0b00100000;
//PORT_PTCD=0b00101010;
// Common_Cathode=1; //or
PORT_PTDD=0b00000001;
// Pin configuration for the input mode*******************************************************************
//PORT_PTBIE=?? ;
//PORT_PTCIE=?? ;
//PORT_PTDIE=?? ;
// Pin configuration for the output mode*******************************************************************
PORT_PTBOE=0b00100000 ;
// PORT_PTCOE=0b000101010;
PORT_PTDOE=0b00000001;
}
Question seconded.
Also if someone answers please also add any documents or other sample programs that can help in learning this daughter board.
Thanks in advance
Have a nice day
Hello,
what exactly is your Problem ? Are you new to Codewarrior or new to HCS08 or both.
You can find a lot of helpful information on this page : MCU on Eclipse | Everything on CodeWarrior, Microcontrollers and Eclipse
It´ll show you how to use eclipse and create projects with processor expert. It is allways the same, no matter which processor core you use.
Look at the schematic of the board to see where the leds etc are connected.
Eckhard
I am new to both. Thanks for the link. I will check it out.