Frequency change constantly - MC9S08QE8

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

Frequency change constantly - MC9S08QE8

1,521 Views
DavidoBG
Contributor II
Now, i can communicate with MCU 9S08QE8 (16Pins) via cyclone PRO. when i erase and flash my program every thing is OK. See the following traces come from True time Simulator
 
Frequency change to ~47011162hz.
Frequency change to ~51944392hz.
Frequency change to ~4841685hz.
Warning a RESET has occured.
Device is 9S08QE8.
Mode is In-Circuit Debug.
IO registers loaded for MC9S08QE8 from C:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.2\prog\REG\MCU1041.REG
executing .\cmd\BDM_P&E_Multilink_CyclonePro_startup.cmd
!// At startup the commands written below will be executed
Target Ready
done .\cmd\BDM_P&E_Multilink_CyclonePro_startup.cmd
Startup command file correctly executed.
executing .\cmd\BDM_P&E_Multilink_CyclonePro_preload.cmd
!// Before load the commands written below will be executed
done .\cmd\BDM_P&E_Multilink_CyclonePro_preload.cmd
Preload command file correctly executed.
CYCLONE PRO detected - Flash Version 8.09
Frequency change to ~4001332hz.
Frequency change to ~4751542hz.
Frequency change to ~3997507hz.
executing C:\Documents and Settings\dle\Mes documents\Developpement\Projet\PWSE\Datasheet\Freescale-Moto\Dev\MC9S08QE8\PWSE\bin\Project.xpr
!Data:1 < ADDXPR ONLY_ADD_IF_NEW "CalFlash"
MCU Device Selection has been changed.
!Data:1 < ADDXPR ONLY_ADD_IF_NEW "_SCIC2"
!Data:1 < ADDXPR ONLY_ADD_IF_NEW "RX_car"
!Data:1 < ADDXPR ONLY_ADD_IF_NEW "Buf_car"
!Data:1 < ADDXPR ONLY_ADD_IF_NEW "PTBDD_PTBDD3"
!Data:1 < ADDXPR ONLY_ADD_IF_NEW "_PTBDD"
!Data:1 < ADDXPR ONLY_ADD_IF_NEW "_ICSC1"
!Data:2 < ADDXPR ONLY_ADD_IF_NEW "CDac"
!Data:2 < ADDXPR ONLY_ADD_IF_NEW "Val_T"
!Data:2 < ADDXPR ONLY_ADD_IF_NEW "MBus.MB"
!Data:2 < ADDXPR ONLY_ADD_IF_NEW "MBus.MBE"
!Data:2 < ADDXPR ONLY_ADD_IF_NEW "Buf_car"
!Data:2 < ADDXPR ONLY_ADD_IF_NEW "_PTBD"
done C:\Documents and Settings\dle\Mes documents\Developpement\Projet\PWSE\Datasheet\Freescale-Moto\Dev\MC9S08QE8\PWSE\bin\Project.xpr
executing .\cmd\BDM_P&E_Multilink_CyclonePro_postload.cmd
!// After load the commands written below will be executed
done .\cmd\BDM_P&E_Multilink_CyclonePro_postload.cmd
Postload command file correctly executed.
After loading program, a MCU reset is doing. the SW start @ FA00 (Normal du to .prm file) but after the Clock bus is changed constanly without obtain #4MHz.
 
main 0xFA00 T
Frequency change to ~0hz.
Frequency change to ~0hz.
STARTED
Frequency change to ~9958515hz.
RUNNING
Frequency change to ~24181012hz.
Frequency change to ~26799352hz.
Frequency change to ~0hz.
Frequency change to ~0hz.
Frequency change to ~0hz.
Frequency change to ~0hz.
Frequency change to ~0hz.
Frequency change to ~0hz.
Frequency change to ~9958515hz.
Frequency change to ~0hz.
Frequency change to ~0hz.
Frequency change to ~0hz.
Frequency change to ~31166610hz.
Frequency change to ~0hz.
Frequency change to ~0hz.
Frequency change to ~0hz.
Frequency change to ~0hz.
Frequency change to ~0hz.
Frequency change to ~0hz.
Frequency change to ~0hz.
Frequency change to ~26214892hz.
Frequency change to ~0hz.
Frequency change to ~15847357hz.
Frequency change to ~0hz.
Frequency change to ~0hz.
STOPPING
HALTED
in>
 
Following my ICS register.
 
ICSC1_CLKS0 = 1;
ICSC1_CLKS1 = 0;
ICSC2_BDIV0 = 1;
ICSC2_BDIV1 = 0;
ICSTRM     = 0xC3;
I would like a bus frequency @ 4MHz
 
Thanks David
 
Added p/n to subject.


Message Edited by NLFSJ on 2008-12-16 09:44 PM
Labels (1)
0 Kudos
1 Reply

233 Views
z537z
Contributor I

This just happened to me with a QG8

turns out it was my PRM file settings, which I'd been messing around with in order to write to flash - if you don't set your program to start execution at the right point (VECTOR 0 _Startup), ie the spot where you've told the linker to stick the program data into flash, then it will never get to the code you have which sets up your ICS registers. And it doesn't know what to do and flies all over the place.

 

Here's a copy of my PRM file:

 

/* This is a linker parameter file for the mc9s08qg8 */NAMES END /* CodeWarrior will pass all the needed files to the linker by command line.              But here you may add your own files too. */SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */    Z_RAM                    =  READ_WRITE   0x0060 TO 0x00FF;    RAM                      =  READ_WRITE   0x0100 TO 0x01FF;    MY_RAM                   =  READ_WRITE   0x0200 TO 0x025F;     F_ROM                    =  READ_ONLY    0xE000 TO 0xE05F RELOCATE_TO 0x0200;     ROM                      =  READ_ONLY    0xE060 TO 0xFFCF; /* INTVECTS                 =  READ_ONLY    0xFFD0 TO 0xFFFF; Reserved for Interrupt Vectors */ENDPLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */        DEFAULT_RAM                         INTO  RAM;    //non zero-page variables    FlashRAM                            INTO  F_ROM;  //Flash Write routine                                           _PRESTART,                          /* startup code */    STARTUP,                            /* startup data structures */    ROM_VAR,                            /* constant variables */    STRINGS,                            /* string literals */    VIRTUAL_TABLE_SEGMENT,              /* C++ virtual table segment */    DEFAULT_ROM,    COPY                                INTO  ROM;/* copy down information: how to initialize variables */                                                                                     _DATA_ZEROPAGE,                     /* zero page variables */    MY_ZEROPAGE                         INTO  Z_RAM;ENDSTACKSIZE 0x50VECTOR 0 _Startup /* Reset vector: this is the default entry point for an application. */

 

Hope this helps somebody

0 Kudos