Hi everyone,
i created a program for ship mcf51cn128 i wanted to try it. I compile a first time without any problem, make a few modifications, and then, this error appears :
then i try to debug, and no problem. So, i retry to compile, and it works one time .
In other words, i can only compile my program one time once i debugged it .
It's a kinda strange problem, also, i don't need to run my program in the debug session, just run debug, quit, and then i can compile. The error always happens after the console line "detect frequence". Maybe it's a configuration clock problem of my program, but i didn't see anything strange on my config.I use codewarrior 10.6 and a multilink universal.
Any ideas ?
Thanks for your help !
Adrien Segura
Hi, was this ever resolved? We're having the same problem!
Hi
Are you trying to read/write any illegal address?
Can you tell me more information, where the programs stops, are you able to see the SRS register?
Hi,
As i said, the error message does not appear when i debug the program, so i don't think i have ant problem with illegal adress.
I tried to compile the same code on the same car with an other computer, the same error message appeared.
The error message appears while the compiler tries to detect the frequence of the ship.
Could it come from an error in clock configuration?
Any ideas? Thanks for your help !
Adrien Segura
Hi
Yes this can be a clock configuration issue, also are you are read/write to the flash, also the flash clock can be an issue
Would be possible that you share a code where I can reproduce the problem
Thanks
Vicente
Hi,
there is my clock configuration function : i work with a 16 Mhz external clock, which works well.
MCGC1_CLKS1 = 1 ;
MCGC1_IREFS = 0 ;
MCGC1_RDIV0 = 0 ;
MCGC1_RDIV1 = 1 ;
MCGC2_BDIV1 = 1 ;
MCGC2_BDIV0 = 0 ;
MCGC2_RANGE = 1 ;
MCGC2_ERCLKEN = 0 ;
MCGC2_EREFS = 1 ;
MCGC2_EREFSTEN = 1 ;
MCGC3_PLLS = 1 ;
MCGC3_CME = 0 ;
MCGC3_DIV32 = 0 ;
SCGC1_SCI1 = 1 ;
SCGC1_SCI2 = 1 ;
SCGC1_IIC1 = 1 ;
SCGC1_IIC2 = 1 ;
SCGC1_TPM1 = 1 ;
SCGC2_FTSR = 1 ;
SCGC2_IRQ = 1 ;
SCGC3_PTB = 1 ;
SCGC3_PTD = 1 ;
SCGC3_PTF = 1 ;
SOPT1_COPT0 = 0 ;
SOPT1_COPT1 = 0 ;
Thanks for your help !
Thanks for the information.
Are you writing to the flash?
Would be possible that you create a new work space and make a new project on this new workspace, this is very weird
Regards
Hi,
Yes i am writing to flash, an di already tried to recreate a workspace, or to use an other computer, same error.
Any ideas? thanks for the help
Please check that the divider use for the Flash clock configuration is correct.
Regards
Hi,
I tried fiew confgurations for the flash clock divider, but it seems that each time , i still have the error.
i did configure the register :
FCDIV = 11 ; // to be between 150 and 200 khz after dividing the clkbus (2 Mhz)
i tried few values, but the result is always the same, do i forgot something?
Thanks for your help !
Adrien Segura
Would be possible that you send me a project where I can reproduce the problem?