Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).
bootloader for 9s12c128 - leoundmarion - Jul 13 7:38:00 2005
Hello!
I adadpted the bootloader described in AN2153.
I didn't copy it into the RAM but put it into ROM at Adress C000 to
D000.
Then I wanted to write into the PAGED Area of the RAM (e.g. 388000)
If I debug the Code with my BDM Debugger step by step everything works
fine, but if I let it run, the Program Conunter crashes after setting
the CBEIF Flag.
Is it nescessary to copy the bootloader into the RAM?
Regards Leo
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: bootloader for 9s12c128 - Jefferson Smith - Jul 13 9:57:00 2005
I don't know that bootloader, but I think your problem is in Flash
programming theory.
The problem is that you can't write to the same block that you are
writing. My first thought was that there is two 64K blocks and you
were reading from Block 0 while writing Block 1, but that was in such
as DG128. The manual for C128 says it is only 1 block of 128K, so you
will have to be in RAM for this one.
--jeffs
--- In 68HC12@68HC..., "leoundmarion" <leoundmarion@y...> wrote:
> Hello!
>
> I adadpted the bootloader described in AN2153.
> I didn't copy it into the RAM but put it into ROM at Adress C000 to
> D000.
> Then I wanted to write into the PAGED Area of the RAM (e.g. 388000)
>
> If I debug the Code with my BDM Debugger step by step everything works
> fine, but if I let it run, the Program Conunter crashes after setting
> the CBEIF Flag.
>
> Is it nescessary to copy the bootloader into the RAM?
>
> Regards Leo

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
RE: bootloader for 9s12c128 - David Wild - Jul 13 11:36:00 2005
Depends what you are doing with it. The Flash writing routine at least has
to be copied into RAM.
On another note I had a similar problem with step by step vs free run mode.
More often than not the cause was poor assembly level programming such as x
and y registers not saved onto the stack before being modifed within a
function.
-----Original Message-----
From: 68HC12@68HC... [mailto:68HC12@68HC...] On Behalf Of
leoundmarion
Sent: Wednesday, July 13, 2005 5:39 AM
To: 68HC12@68HC...
Subject: [68HC12] bootloader for 9s12c128
Hello!
I adadpted the bootloader described in AN2153.
I didn't copy it into the RAM but put it into ROM at Adress C000 to D000.
Then I wanted to write into the PAGED Area of the RAM (e.g. 388000)
If I debug the Code with my BDM Debugger step by step everything works fine,
but if I let it run, the Program Conunter crashes after setting the CBEIF
Flag.
Is it nescessary to copy the bootloader into the RAM?
Regards Leo
Yahoo! Groups Links
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: bootloader for 9s12c128 - Oliver Betz - Jul 14 2:48:00 2005
"leoundmarion" <leoundmarion@leou...> wrote:
> I adadpted the bootloader described in AN2153.
> I didn't copy it into the RAM but put it into ROM at Adress C000 to
> D000. Then I wanted to write into the PAGED Area of the RAM (e.g.
> 388000)
as David Wild and Jefferson Smith already stated, you can't execute a
bootloader from the same Flash block being written.
> If I debug the Code with my BDM Debugger step by step everything works
> fine, but if I let it run, the Program Conunter crashes after setting
> the CBEIF Flag.
Because the CPU was in BDM memory during the flash write.
Oliver
--
Oliver Betz, Muenchen

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: bootloader for 9s12c128 - leoundmarion - Jul 16 4:07:00 2005
The bootloader works really good for the paged addresses but I have
problems, to delete the Address Range from C000 - FFFF.
In the Application Note Bootloader there are also only S2 Records
supported.
How am I abble to write on this Address Range

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: bootloader for 9s12c128 - leoundmarion - Jul 19 8:38:00 2005
The bootloader works really good for the paged addresses (eg. 3A8000 -
3ABFFF)
but I have problems, to write to the Address Range from C000 - FFFF.
Because I have mapped my RAM to this position.
What can I do. Do I have to map the RAM to another position to write
to this Address Range?
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )