Hello,
We recently purchased the S08PT60-EVK evaluation board as we are looking to use the S08PT60. I have CodeWarrior V10.7. It appears that the example project and code may have designed for a previous version of CodeWarrior.
I ended up copying all of the .c and .h files from the example code directories devices->common, devices->drivers, and devices->platform into the corresponding source and header file directories within the Codewarrior 10.7 project. The project compiles and runs albeit barely.
The code in question is the ITIM1 interrupt service routine after main routine:
/************************************************************************
* main - Program main entry point *
*************************************************************************/
void main(void)
{
uint8_t i = 0;
// volatile unsigned char dummy;
// unsigned short uiCount;
//Initialise system including clocks
//Watchdog: disabled
//FEE: BUS clock 16MHz
//Serial terminal: SCI2 baudrate 115200
Sys_Init();
EnableInterrupts;
printf("\n-- S08PT60-EVK OOBE BEGINS--\n");
printf("\n");
LED_Init();
LED_Test();
//Initialise MTIM1, 1ms interrupt interval, used for 1ms time delay
MTIM1_Init();
//Initialise MTIM2 to generate PWM
FTM2_Init();
//Initialise I2C PTA2/3 used for FXOS8700CQ write/read
Accel_I2C_Init();
FXOS8700CQ_Test();
//while (1);
}
//MTIM1 is used for delay 1 milliseconds
interrupt VectorNumber_Vmtim1 void Mtim1_ISR(void)
{
LED0_On();
DisableInterrupts;
if(MTIM1_SC_TOF)
{
// clear the flag
MTIM1_SC_TOF = 0;
}
g_delay_1ms_done = 1;
EnableInterrupts;
}
The Mtim1_ISR(void) never gets called. I tested it as can be seen by putting a LED0_On() at the beginning of it (LED0_On() works elsewhere turning a RED LED on).
There's a couple of things - since this project is sort of a mish mash, where does the function Mtim1_ISR(void) get registered to be the actual MTIM1 interrupt routine? I'm assuming it's by using " VectorNumber_Vmtim1". If that's not correct, what is the correct way?
I'm attaching my project so that you can possibly see any issues with how the project is structured.
Thanks so much!
Best Regards,
Rick