Full Chip Simulator, TPM and TIM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Full Chip Simulator, TPM and TIM

5,945 Views
quipu
Contributor I
Hi all,
using Device Initialization tool I create a very simple application using CW 5.7.0 (Special Edition) for target MC9S08QG8.
I initialize only CPU and TMP. I configured TMP with interrupt enable (every ~16ms).
In the TPM_ISR simple manage interrupt us follow:

Code:
__interrupt void TPM_ISR(void){  TPMSC;          // read the timer overflow status  TPMSC_TOF = 0;  // and clear it}

I try to debug code with Full Chip Simulator. I setted a breakpoint
in the TPM_ISR, but execution never stop.

Can anyone help me?

I build similar project using MC68HC908LJ12 and T1SC0 and I able to break in
T1SC0 ISR.



Labels (1)
0 Kudos
9 Replies

698 Views
Curt
Contributor IV
Hi quipu
 
I had a similar problem with the "wait" interrupt on the MC9RS08, and was told by the helpful people here that the full chip simulator simply didn't simulate that aspect of my MCU.  So maybe the FCS for your device has a similar problem.
 
My solution has been to include a few lines of code in my programs that simulate
the interrupt behavior when I run it on the full chip simulator!  Sounds crazy -- but it
works, and lets me do a lot of testing without downloading my code into my MCU. 
0 Kudos

698 Views
joerg
Contributor II
Hi
As Curt mentioned the simulator for most of the HCS08 devices does not fire the TPM interrupt in OC mode. If you use the MOD mode it will work! But i do not see in what mode you will put the MPU!

??? Did you declare the Interrupt routine in the PRM file ??????

A working example can be found on my home page :

www.systech-gmbh.ch  -> EBS08 -> EBS08C_QG8

Saluti Joerg
0 Kudos

698 Views
Curt
Contributor IV
Hi quipu:
 
jeorg is the "helpful people" mentioned in my previous note!
 
Hi jeorg!
0 Kudos

698 Views
quipu
Contributor I
Hi Curt and Joreg,

and thanks for fast answer.
I generated my TPM test project with CW and Device Initializazion Tool.
I not changed the default initialization of CPU and configured the TPM
with Clock Source=bus rate clock and enabled interrpt overflow.

I see that in di generated code MCUInit.c the interrupt is declared in
vector table.

I have attached my project.

If the TPM module is not supported under simulation, can I workaround
the problem ?

Where I can find information on the Full Chip Simulator that they say what
is and what isn't notsupported ?
0 Kudos

698 Views
joerg
Contributor II
Hi
I have tried to get running your project. Since i never used the processor expert it was a interesting experience too!
First to the simulator:
How i said the TPM does not fire or change any flags (TOF, etc.) the only thing that is working is when you set the MOD register to a value different to 0x0000 or 0xFFFF!
It would be nice from P&E to fix this bug!
I have put different service requests for that issue month ago!!
I have uploaded the now working version, but i think the ISR does not make really sense this way.

My impressions using the processor expert are somewhat insecure about the benefits. Sure it helps to get into the different MPUs and their comments. But it creates a lot of overhead as the example shows clearly!
It seems that those tools did not make any progress since i am programming and this are quiet some years now (my first programs are form 1981 or so!). So i prefer the handmade way.

It would be nice to have somewhat like a database, where we could look up the known issues for the MPU used!

Hoping this helps

Saluti Joerg


0 Kudos

698 Views
Alban
Senior Contributor II
Hi Joerg,

The Simulator is not done by P&E Microcomputers, but by CodeWarrior, I believe.
I would suggest a Service Request so, if your bug report is validated (I didn't check), it will be entered in the bug list to be fixed.

Cheers,
Alban.
0 Kudos

698 Views
joerg
Contributor II
Hi Alban
Strange thing! When i reported i was said, this is a P&E problem an will be fixed until march or so. But i do not see any improvements until yet. I hope the bugs are fixed i version 6.0000!

Saluti Joerg
0 Kudos

698 Views
P_EMark
Contributor III
Joerg, All:

This was a reported issue on our HCS08 simulation; the updated simulators in v6.0 will indeed address this issue!

Regards,
   Mark
0 Kudos

698 Views
Alban
Senior Contributor II
Just the guy we needed !
Thanks for the clarification, Mark.

Cheers,
Alban.
0 Kudos