Help

Started by Jerry Fields December 1, 2009
Hello, I have a mc9s12dp512 running on a Axiom CMD12DP512 board. I was making slight modifications on the program, but when I tried to reload it into internal flash, I keep getting an error that it "Can Not Set Program Counter".

When I try to erace the flash memory, it errors out, and tells me the same thing.

Does anybody have any ideas?

_________________________________________________________________
Windows 7: Unclutter your desktop. Learn more.
http://www.microsoft.com/windows/windows-7/videos-tours.aspx?h=7sec&slideid=1&mediaro-shake-7second&listid=1&stop=1&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_7secdemo:122009



In addition, when I try to load a program into flash memory or try to erase the flash, all of the memory addresses change from various values to all Fs. If I then hit reset, the memory addresses revert back to normal.

One more question, is it OK to run the program in flash memory? Was I supposed to write a routine that extracts it from flash, place it in RAM, and run it in there? Is this the type of EEPROM that has a finite amount of writes, and THAT is why my I can not write anything to flash?

FYI, it is a C program, but most of my code is in assembly. I use the asm(""); code to insert the assembly.

Thanks in advance for any help.

Jerry

To: 6...
From: e...@hotmail.com
Date: Tue, 1 Dec 2009 14:37:01 -0500
Subject: [68HC12] Help

Hello, I have a mc9s12dp512 running on a Axiom CMD12DP512 board. I was making slight modifications on the program, but when I tried to reload it into internal flash, I keep getting an error that it "Can Not Set Program Counter".

When I try to erace the flash memory, it errors out, and tells me the same thing.

Does anybody have any ideas?

__________________________________________________________
Windows 7: Unclutter your desktop. Learn more.
http://www.microsoft.com/windows/windows-7/videos-tours.aspx?h=7sec&slideid=1&mediaro-shake-7second&listid=1&stop=1&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_7secdemo:122009



_________________________________________________________________
Get gifts for them and cashback for you. Try Bing now.
http://www.bing.com/shopping/search?q=xbox+games&scopehback&form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_Shopping_Giftsforthem_cashback_1x1



You cannot wear out the flash with normal usage (at least I've never
managed to wear it out ). Generally code runs from the flash though
nothing stops one from running code out of ram.

I had a quick look at the documentation online for this board and it
looks like it comes with a monitor for code upload and debug with gcc as
the C compiler. Nothing wrong with that arrangement but I use a bdm pod
and a different compiler (ICC) so I can't give you much advice as to why
your code isn't loading as you expect. Often the 9s12 binary output
requires modification with the SRecCvt utility program.

-rob

Jerry Fields wrote:
> In addition, when I try to load a program into flash memory or try to erase the flash, all of the memory addresses change from various values to all Fs. If I then hit reset, the memory addresses revert back to normal.
>
>
>
> One more question, is it OK to run the program in flash memory? Was I supposed to write a routine that extracts it from flash, place it in RAM, and run it in there? Is this the type of EEPROM that has a finite amount of writes, and THAT is why my I can not write anything to flash?
>
>
>
> FYI, it is a C program, but most of my code is in assembly. I use the asm(""); code to insert the assembly.
>
>
>
> Thanks in advance for any help.
>
>
>
> Jerry
>
>
>
>
>
>
> To: 6...
> From: e...@hotmail.com
> Date: Tue, 1 Dec 2009 14:37:01 -0500
> Subject: [68HC12] Help
>
>
>
> Hello, I have a mc9s12dp512 running on a Axiom CMD12DP512 board. I was making slight modifications on the program, but when I tried to reload it into internal flash, I keep getting an error that it "Can Not Set Program Counter".
>
> When I try to erace the flash memory, it errors out, and tells me the same thing.
>
> Does anybody have any ideas?
>
> __________________________________________________________
> Windows 7: Unclutter your desktop. Learn more.
> http://www.microsoft.com/windows/windows-7/videos-tours.aspx?h=7sec&slideid=1&mediaro-shake-7second&listid=1&stop=1&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_7secdemo:122009
>
>
>
> _________________________________________________________________
> Get gifts for them and cashback for you. Try Bing now.
> http://www.bing.com/shopping/search?q=xbox+games&scopehback&form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_Shopping_Giftsforthem_cashback_1x1
>
>
>
>
Hi

Following your problem about flashing on Axiom DP512...
I've Axiom with MC9S12DP256. It helps me to start with 9S12.
I can flash the CPU without problem.

What compiler do you use ?
What debugger ?
What tool for flashing ?

I use ICC12V7 and NoIce, and I can flash CPU.
You can debug with your code in flash. Fortunately !
Maybe your compiler options are not good for your CPU ? I had that kind of
problem (Program memory, Data memory, Stack Pointer...)

Best regards
Joel
-----Message d'origine-----
De: 6... [mailto:6...] De la part de
Rob Milne
Envoy mercredi 2 dembre 2009 03:53
: 6...
Objet: Re: [68HC12] Help

You cannot wear out the flash with normal usage (at least I've never
managed to wear it out ). Generally code runs from the flash though
nothing stops one from running code out of ram.

I had a quick look at the documentation online for this board and it
looks like it comes with a monitor for code upload and debug with gcc as
the C compiler. Nothing wrong with that arrangement but I use a bdm pod
and a different compiler (ICC) so I can't give you much advice as to why
your code isn't loading as you expect. Often the 9s12 binary output
requires modification with the SRecCvt utility program.

-rob

Jerry Fields wrote:
> In addition, when I try to load a program into flash memory or try to
erase the flash, all of the memory addresses change from various values to
all Fs. If I then hit reset, the memory addresses revert back to normal.
>
>
>
> One more question, is it OK to run the program in flash memory? Was I
supposed to write a routine that extracts it from flash, place it in RAM,
and run it in there? Is this the type of EEPROM that has a finite amount of
writes, and THAT is why my I can not write anything to flash?
>
>
>
> FYI, it is a C program, but most of my code is in assembly. I use the
asm(""); code to insert the assembly.
>
>
>
> Thanks in advance for any help.
>
>
>
> Jerry
>
>
>
>
>
>
> To: 6...
> From: e...@hotmail.com
> Date: Tue, 1 Dec 2009 14:37:01 -0500
> Subject: [68HC12] Help
>
>
>
> Hello, I have a mc9s12dp512 running on a Axiom CMD12DP512 board. I was
making slight modifications on the program, but when I tried to reload it
into internal flash, I keep getting an error that it "Can Not Set Program
Counter".
>
> When I try to erace the flash memory, it errors out, and tells me the same
thing.
>
> Does anybody have any ideas?
>
> __________________________________________________________
> Windows 7: Unclutter your desktop. Learn more.
>
http://www.microsoft.com/windows/windows-7/videos-tours.aspx?h=7sec&slideid=
1&media=aero-shake-7second&listid=1&stop=1&ocid=PID24727::T:WLMTAGL:ON:WL:en
-US:WWL_WIN_7secdemo:122009
>
>
>
> _________________________________________________________________
> Get gifts for them and cashback for you. Try Bing now.
>
http://www.bing.com/shopping/search?q=xbox+games&scope=cashback&form=MSHYCB&
publ=WLHMTAG&crea=TEXT_MSHYCB_Shopping_Giftsforthem_cashback_1x1
>
>
>
>
I guess Unsecure12 won't work with Compod12.
Doesn't Elmicro/Elektronikladen provide some utility to unsecure chips?

Edward

----- Original Message -----
From: "Petrescu"
To: <6...>
Sent: Tuesday, February 09, 2010 07:36
Subject: Re: [68HC12] Help
> Search on PEMicro site for the program "Unsecure_12" and use it.
> IP.
>
> Joe Dee Kay wrote:
>>
>> I accidentally plugged my BDM in backward. Since then I haven't been
>> able to
>> access the flash. I'm thinking it accidentally secured the processor.
>> Trying
>> to unsecure the processor I found the 27 step procedure but how do I
>> program
>> the flash when my BDM pod doesn't work?
>>
>> I have a s12compact and I use compod12.
>>
>> --
>> Joe Dee
>>
>>
>
compod12 uses starprog and there is a unsecure button but it doesn't do
anything.

On Mon, Feb 8, 2010 at 11:25 PM, Edward Karpicz wrote:

> I guess Unsecure12 won't work with Compod12.
> Doesn't Elmicro/Elektronikladen provide some utility to unsecure chips?
>
> Edward
>
> ----- Original Message -----
> From: "Petrescu"
> To: <6...>
> Sent: Tuesday, February 09, 2010 07:36
> Subject: Re: [68HC12] Help
> > Search on PEMicro site for the program "Unsecure_12" and use it.
> > IP.
> >
> > Joe Dee Kay wrote:
> >>
> >> I accidentally plugged my BDM in backward. Since then I haven't been
> >> able to
> >> access the flash. I'm thinking it accidentally secured the processor.
> >> Trying
> >> to unsecure the processor I found the 27 step procedure but how do I
> >> program
> >> the flash when my BDM pod doesn't work?
> >>
> >> I have a s12compact and I use compod12.
> >>
> >> --
> >> Joe Dee
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> >
So it looks like I can buy another BDM pod to unsecure the device. Is there
anyway of doing it without spending 200+ dollars?

On Tue, Feb 9, 2010 at 10:30 AM, Joe Dee Kay wrote:

> compod12 uses starprog and there is a unsecure button but it doesn't do
> anything.
>
> On Mon, Feb 8, 2010 at 11:25 PM, Edward Karpicz wrote:
>
>> I guess Unsecure12 won't work with Compod12.
>> Doesn't Elmicro/Elektronikladen provide some utility to unsecure chips?
>>
>> Edward
>>
>> ----- Original Message -----
>> From: "Petrescu"
>> To: <6...>
>> Sent: Tuesday, February 09, 2010 07:36
>> Subject: Re: [68HC12] Help
>> > Search on PEMicro site for the program "Unsecure_12" and use it.
>> > IP.
>> >
>> > Joe Dee Kay wrote:
>> >>
>> >> I accidentally plugged my BDM in backward. Since then I haven't been
>> >> able to
>> >> access the flash. I'm thinking it accidentally secured the processor.
>> >> Trying
>> >> to unsecure the processor I found the 27 step procedure but how do I
>> >> program
>> >> the flash when my BDM pod doesn't work?
>> >>
>> >> I have a s12compact and I use compod12.
>> >>
>> >> --
>> >> Joe Dee
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> >
>> >