Help with AN 2720

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

Help with AN 2720

3,551 Views
tim_milliken
Contributor III
I am trying to use the AN2720 as a flash bootloader to reprog. the HC12 in the feild. I understand all of the code fine, but what I am unclear about is a few things. 1 the flash.h file is left out of the An2720SW.zip but I was able to snip it from the pdf file. 2 There is a struct missing somewhere that I am not sure how to construct it. The following code snipit uses that struct
 
Flash.fclkdiv.byte = Flash.fclkdiv.byte | fclk_val;
 
That is cut straighe from the flash.c file. So where is that struc defined at?
I am using the MC9s12DJ64. I have looked at other methods of erasing ans reprogramming the flash but this seems to be the most straight foward if I can figure out that struct. Thanks for any help.
Tim
Labels (1)
0 Kudos
3 Replies

577 Views
tim_milliken
Contributor III
Well I guess I posted a little too early. After getting it all coded and tested, it works great till I switch to the D page. When I try to erase even the first sector in the D page it will erase the first sector in the C page. I have tried all that I know to make it work, even loading the PPAGE with 0x0D right before I go into the flash_erase_sector and still not working. Any more ideas? Thanks Tim
0 Kudos

577 Views
DrSeuss
Contributor I

The definition below is an old stationary. Attached is a new version using "standard" CodeWarrior defines.

 

http://www.freescale.com/webapp/sps/download/license.jsp?colCode=AN2720_SW

[requires registration and login]

Message Edited by t.dowe on 2009-09-11 03:32 PM
0 Kudos

577 Views
tim_milliken
Contributor III
I had already gave up on getting help, I did not have it working yet, that is till today when I seen your reply. Thanks it worked flawless, you was alot of help. Thnaks Tim

Message Edited by tim_milliken on 05-14-200604:01 PM

0 Kudos