Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).
|
Hi folks, First let me say that I have read/am aware of Motorola's App Note 1828 on the subject. I was wondering if anyone had written their own software for programming the Flash of an HC12 over CAN. How well did it work? Did you employ the bootloader-to-load-a-bigger-bootloader-in-RAM method (i.e., a low-level permanent bootloader that loads a larger LRAE program that does all the real programming, verifying, etc.) described in the App Note? Were the bootloader(s) written in assembly or C? Was a separate coding effort needed for programming the EEPROM? Are there any third-party products/companies that would do sell such a package as well and would save the time of development? Does anyone have experience with these? (I am using a MC912DG128A and have experience with Vector's CANalyzer.) Thanks in advance, - Andrew |
|
|
|
I am also working on a CAN bootloader and I have noticed other posts (K-Line etc) and now the post from Trevor. My question is, is there a number of people/companies that are interested in combining efforts to create some code, either as open source or code used amongst the contributors, that could be used with whatever communication flavor they choose? Steve Automated lighting systems at www.brightan.com Embedded micro-controllers and CAN interfaces at www.zanthic.com > ----- Original Message ----- > From: "Trevor Wigle" <> > To: "68HC12" <> > Sent: Wednesday, September 10, 2003 4:25 PM > Subject: [68HC12] Flash/EEPROM Programming via CAN > > Hi folks, > > > > First let me say that I have read/am aware of Motorola's App Note 1828 on > > the subject. > > > > I was wondering if anyone had written their own software for programming > the > > Flash of an HC12 over CAN. How well did it work? Did you employ the > > bootloader-to-load-a-bigger-bootloader-in-RAM method (i.e., a low-level > > permanent bootloader that loads a larger LRAE program that does all the > real > > programming, verifying, etc.) described in the App Note? Were the > > bootloader(s) written in assembly or C? Was a separate coding effort > needed > > for programming the EEPROM? > > > > Are there any third-party products/companies that would do sell such a > > package as well and would save the time of development? Does anyone have > > experience with these? > > > > (I am using a MC912DG128A and have experience with Vector's CANalyzer.) > > > > Thanks in advance, > > > > - Andrew > > > > > > > > -------------------------------------------------------- > > To unsubscribe from this group, send an email to: > > > > > > To learn more about Motorola Microcontrollers, please visit > > http://www.motorola.com/mcu > > > > > > > > > > > |
|
Hi! I've been working on M68HC912DG128As and CAN for the last three years and I'm now designing/ writing my own software for Flash programming over CAN for HC12 and HCS12 in C. Vector has some software available also: http://www.vector-informatik.de/english/products/ecu.html JK -----Original Message----- From: Trevor Wigle [mailto:] Sent: 11. syyskuuta 2003 1:25 To: 68HC12 Subject: [68HC12] Flash/EEPROM Programming via CAN Hi folks, First let me say that I have read/am aware of Motorola's App Note 1828 on the subject. I was wondering if anyone had written their own software for programming the Flash of an HC12 over CAN. How well did it work? Did you employ the bootloader-to-load-a-bigger-bootloader-in-RAM method (i.e., a low-level permanent bootloader that loads a larger LRAE program that does all the real programming, verifying, etc.) described in the App Note? Were the bootloader(s) written in assembly or C? Was a separate coding effort needed for programming the EEPROM? Are there any third-party products/companies that would do sell such a package as well and would save the time of development? Does anyone have experience with these? (I am using a MC912DG128A and have experience with Vector's CANalyzer.) Thanks in advance, - Andrew -------------------------------------------------------- To unsubscribe from this group, send an email to: To learn more about Motorola Microcontrollers, please visit http://www.motorola.com/mcu |
|
Hi Trevor,
Yes, we made our own bootrom, which let us download program to FLASH by CAN. Our bootrom have size 2K and placed at 0xF000 address of HCS12 DG128 microcontroller. Boot procces consist of this parts: 1. Host (PC or CAN-master) send 4 messages with specific ID. This messages contains unique (4 double words) address of module. (Address writed in protected area of bootrom and can not be rewrited) 2. If module received its address it start receive other messages that hold RAM-data. This way let us load any program to RAM. At then end we send message this 'jump to RAM' command. 3. RAM program had all needed Flash/EEPROM routines (PROGRAM/ERASE/READ). For example host can send 'flash erase' command or 'load flash' command. 4. Then host done flash programming it's send 'reset command'. After this module reboots (by watchdog) and starts again from bootrom. After 0.3 sec passed, if no messages with address of modules comes, module jumped from bootrom to main program in Flash. All code (for bootrom and RAM program) writed in C. (assemler used only for 'jump to address' routine). All works fine. It is simple to write this programs (I have spend two weeks). If you want, I can send sources. WBR, lenux |
|
|
|
> All code (for bootrom and RAM program) writed in C. (assemler used > only for 'jump to address' routine). All works fine. It is simple to > write this programs (I have spend two weeks). If you want, I can send > sources. hi lenux, If You can? I'll be happy... Mariusz |
|
|
|
I put it to Files. Archive call bootrom.zip and contain two IAR projects with bootrom and RAM program. WBR, lenux --- In , "manekb2000" <manekb@p...> wrote: > > All code (for bootrom and RAM program) writed in C. (assemler used > > only for 'jump to address' routine). All works fine. It is simple > to > > write this programs (I have spend two weeks). If you want, I can > send > > sources. > hi lenux, > If You can? > I'll be happy... > Mariusz |
|
That sounds easier than my experience told me till now. My main problem is not to change the Protocol to some other (I will implement a Bootloader via K-Line Protocol). I still can not port the Bootloader-samplecode (written in Assembler) from Motorola to C. So it would be realy great if i could get source from you to understand how the bootloader works and how it could be implemented in C. If someone will be interested in Bootloading via K-Line i will also give Sourcecode ( After i got it working *g*) Alex --- In , "lenux22" <lenux22@y...> wrote: > Hi Trevor, > Yes, we made our own bootrom, which let us download program to FLASH > by CAN. Our bootrom have size 2K and placed at 0xF000 address of > HCS12 DG128 microcontroller. Boot procces consist of this parts: > 1. Host (PC or CAN-master) send 4 messages with specific ID. This > messages contains unique (4 double words) address of module. (Address > writed in protected area of bootrom and can not be rewrited) > 2. If module received its address it start receive other messages that > hold RAM-data. This way let us load any program to RAM. At then end > we send message this 'jump to RAM' command. > 3. RAM program had all needed Flash/EEPROM routines > (PROGRAM/ERASE/READ). For example host can send 'flash erase' > command or 'load flash' command. > 4. Then host done flash programming it's send 'reset command'. After > this module reboots (by watchdog) and starts again from bootrom. After > 0.3 sec passed, if no messages with address of modules comes, module > jumped from bootrom to main program in Flash. > > > All code (for bootrom and RAM program) writed in C. (assemler used > only for 'jump to address' routine). All works fine. It is simple to > write this programs (I have spend two weeks). If you want, I can send > sources. > > > WBR, lenux |
|
|
|
UPS! To fast!*g* Thanks for sharing!! Alex --- In , "Alexander Veit" <alex.veit@t...> wrote: > That sounds easier than my experience told me till now. > > My main problem is not to change the Protocol to some other (I will > implement a Bootloader via K-Line Protocol). I still can not port the > Bootloader-samplecode (written in Assembler) from Motorola to C. > > So it would be realy great if i could get source from you to > understand how the bootloader works and how it could be implemented > in C. > > If someone will be interested in Bootloading via K-Line i will also > give Sourcecode ( After i got it working *g*) > > Alex > > --- In , "lenux22" <lenux22@y...> wrote: > > Hi Trevor, > > > > > > Yes, we made our own bootrom, which let us download program to > FLASH > > by CAN. Our bootrom have size 2K and placed at 0xF000 address of > > HCS12 DG128 microcontroller. Boot procces consist of this parts: > > > > > > 1. Host (PC or CAN-master) send 4 messages with specific ID. This > > messages contains unique (4 double words) address of module. > (Address > > writed in protected area of bootrom and can not be rewrited) > > > > > > 2. If module received its address it start receive other messages > that > > hold RAM-data. This way let us load any program to RAM. At then > end > > we send message this 'jump to RAM' command. > > > > > > 3. RAM program had all needed Flash/EEPROM routines > > (PROGRAM/ERASE/READ). For example host can send 'flash erase' > > > > > > command or 'load flash' command. > > > > > > 4. Then host done flash programming it's send 'reset command'. > After > > this module reboots (by watchdog) and starts again from bootrom. > After > > 0.3 sec passed, if no messages with address of modules comes, > module > > jumped from bootrom to main program in Flash. > > > > > > > > > > All code (for bootrom and RAM program) writed in C. (assemler used > > only for 'jump to address' routine). All works fine. It is simple > to > > write this programs (I have spend two weeks). If you want, I can > send > > sources. > > > > > > > > > > WBR, lenux |
|
I hate to post a "me too" but I would also like a copy of this code, if possible. Thanks! Steve Automated lighting systems at www.brightan.com Embedded micro-controllers and CAN interfaces at www.zanthic.com ----- Original Message ----- From: "Alexander Veit" <> To: <> Sent: Friday, September 12, 2003 5:18 AM Subject: [68HC12] Re: Flash/EEPROM Programming via CAN > UPS! > > To fast!*g* > > Thanks for sharing!! > > Alex > --- In , "Alexander Veit" <alex.veit@t...> > wrote: > > That sounds easier than my experience told me till now. > > > > My main problem is not to change the Protocol to some other (I will > > implement a Bootloader via K-Line Protocol). I still can not port > the > > Bootloader-samplecode (written in Assembler) from Motorola to C. > > > > So it would be realy great if i could get source from you to > > understand how the bootloader works and how it could be implemented > > in C. > > > > If someone will be interested in Bootloading via K-Line i will also > > give Sourcecode ( After i got it working *g*) > > > > Alex > > > > --- In , "lenux22" <lenux22@y...> wrote: > > > Hi Trevor, > > > > > > > > > Yes, we made our own bootrom, which let us download program to > > FLASH > > > by CAN. Our bootrom have size 2K and placed at 0xF000 address of > > > HCS12 DG128 microcontroller. Boot procces consist of this parts: > > > > > > > > > 1. Host (PC or CAN-master) send 4 messages with specific ID. This > > > messages contains unique (4 double words) address of module. > > (Address > > > writed in protected area of bootrom and can not be rewrited) > > > > > > > > > 2. If module received its address it start receive other messages > > that > > > hold RAM-data. This way let us load any program to RAM. At then > > end > > > we send message this 'jump to RAM' command. > > > > > > > > > 3. RAM program had all needed Flash/EEPROM routines > > > (PROGRAM/ERASE/READ). For example host can send 'flash erase' > > > > > > > > > command or 'load flash' command. > > > > > > > > > 4. Then host done flash programming it's send 'reset command'. > > After > > > this module reboots (by watchdog) and starts again from bootrom. > > After > > > 0.3 sec passed, if no messages with address of modules comes, > > module > > > jumped from bootrom to main program in Flash. > > > > > > > > > > > > > > > All code (for bootrom and RAM program) writed in C. (assemler > used > > > only for 'jump to address' routine). All works fine. It is simple > > to > > > write this programs (I have spend two weeks). If you want, I can > > send > > > sources. > > > > > > > > > > > > > > > WBR, lenux > > -------------------------------------------------------- > To unsubscribe from this group, send an email to: > To learn more about Motorola Microcontrollers, please visit > http://www.motorola.com/mcu |
|
|
|
I would also like to have a copy of the code. Cheers, Yogeesh > ----- Original Message ----- > From: "Alexander Veit" <alex.veit@t...> > To: <> > Sent: Friday, September 12, 2003 5:18 AM > Subject: [68HC12] Re: Flash/EEPROM Programming via CAN > > UPS! > > > > To fast!*g* > > > > Thanks for sharing!! > > > > Alex |
|
|
|
Hi Lenux, Thank you for you informative response and generously posting your code. I was curious what you did for the host (i.e., non-HC12) side of things. Did you write a PC program to communicate with your bootrom? If so, for what language (Visual Basic, some scripting language, etc.)? How did you interface your target HC12 to your PC (or whatever contains the "new" code)? Did you use any specific cables, like Vector's CANcardX (or make a "smart" cable mentioned in the app note)? Can you make any recommendations? Thanks, - Andrew -----Original Message----- From: lenux22 [mailto:] Sent: Thursday, September 11, 2003 3:22 AM To: Subject: [68HC12] Re: Flash/EEPROM Programming via CAN Hi Trevor, Yes, we made our own bootrom, which let us download program to FLASH by CAN. Our bootrom have size 2K and placed at 0xF000 address of HCS12 DG128 microcontroller. Boot procces consist of this parts: 1. Host (PC or CAN-master) send 4 messages with specific ID. This messages contains unique (4 double words) address of module. (Address writed in protected area of bootrom and can not be rewrited) 2. If module received its address it start receive other messages that hold RAM-data. This way let us load any program to RAM. At then end we send message this 'jump to RAM' command. 3. RAM program had all needed Flash/EEPROM routines (PROGRAM/ERASE/READ). For example host can send 'flash erase' command or 'load flash' command. 4. Then host done flash programming it's send 'reset command'. After this module reboots (by watchdog) and starts again from bootrom. After 0.3 sec passed, if no messages with address of modules comes, module jumped from bootrom to main program in Flash. All code (for bootrom and RAM program) writed in C. (assemler used only for 'jump to address' routine). All works fine. It is simple to write this programs (I have spend two weeks). If you want, I can send sources. WBR, lenux -------------------------------------------------------- To unsubscribe from this group, send an email to: To learn more about Motorola Microcontrollers, please visit http://www.motorola.com/mcu |
|
|
|
Hello, Trevor.
To interface with HCS12 (i.e. load program to it) we use CAN-USB or CAN-COM module. Yes, we write PC program (in C) to communicate via USB or COM port with target (HCS12 device). All cables we made by ourselfs. Our standart cable is 4-pin (CAN HIGH, CAN LOW, VCC and GND) and connected to HCS12 to supply it with Vcc. WBR, lenux --- In , "Trevor Wigle" <trevorwigle@e...> wrote: > Hi Lenux, > Thank you for you informative response and generously posting your code. > I was curious what you did for the host (i.e., non-HC12) side of things. > Did you write a PC program to communicate with your bootrom? If so, for > what language (Visual Basic, some scripting language, etc.)? How did you > interface your target HC12 to your PC (or whatever contains the "new" code)? > Did you use any specific cables, like Vector's CANcardX (or make a "smart" > cable mentioned in the app note)? Can you make any recommendations? > Thanks, > - Andrew > -----Original Message----- > From: lenux22 [mailto:lenux22@y...] > Sent: Thursday, September 11, 2003 3:22 AM > To: > Subject: [68HC12] Re: Flash/EEPROM Programming via CAN > Hi Trevor, > Yes, we made our own bootrom, which let us download program to FLASH > by CAN. Our bootrom have size 2K and placed at 0xF000 address of > HCS12 DG128 microcontroller. Boot procces consist of this parts: > 1. Host (PC or CAN-master) send 4 messages with specific ID. This > messages contains unique (4 double words) address of module. (Address > writed in protected area of bootrom and can not be rewrited) > 2. If module received its address it start receive other messages that > hold RAM-data. This way let us load any program to RAM. At then end > we send message this 'jump to RAM' command. > 3. RAM program had all needed Flash/EEPROM routines > (PROGRAM/ERASE/READ). For example host can send 'flash erase' > command or 'load flash' command. > 4. Then host done flash programming it's send 'reset command'. After > this module reboots (by watchdog) and starts again from bootrom. After > 0.3 sec passed, if no messages with address of modules comes, module > jumped from bootrom to main program in Flash. > All code (for bootrom and RAM program) writed in C. (assemler used > only for 'jump to address' routine). All works fine. It is simple to > write this programs (I have spend two weeks). If you want, I can send > sources. > WBR, lenux > -------------------------------------------------------- > To unsubscribe from this group, send an email to: > To learn more about Motorola Microcontrollers, please visit > http://www.motorola.com/mcu |
|
Hello Lenux, I have written a simple download procedure for downloading via RS232 (for DP256 CPU). It works fine, but I also wanted to download code via CAN. Is it possible that you send me a example how to do this? What Hardware, software do you use on PC- side ? Best regards Andy ----- Original Message ----- From: lenux22 To: Sent: Wednesday, September 17, 2003 11:18 AM Subject: [68HC12] Re: Flash/EEPROM Programming via CAN Hello, Trevor. To interface with HCS12 (i.e. load program to it) we use CAN-USB or CAN-COM module. Yes, we write PC program (in C) to communicate via USB or COM port with target (HCS12 device). All cables we made by ourselfs. Our standart cable is 4-pin (CAN HIGH, CAN LOW, VCC and GND) and connected to HCS12 to supply it with Vcc. WBR, lenux --- In , "Trevor Wigle" <trevorwigle@e...> wrote: > Hi Lenux, > Thank you for you informative response and generously posting your code. > I was curious what you did for the host (i.e., non-HC12) side of things. > Did you write a PC program to communicate with your bootrom? If so, for > what language (Visual Basic, some scripting language, etc.)? How did you > interface your target HC12 to your PC (or whatever contains the "new" code)? > Did you use any specific cables, like Vector's CANcardX (or make a "smart" > cable mentioned in the app note)? Can you make any recommendations? > Thanks, > - Andrew > -----Original Message----- > From: lenux22 [mailto:lenux22@y...] > Sent: Thursday, September 11, 2003 3:22 AM > To: > Subject: [68HC12] Re: Flash/EEPROM Programming via CAN > Hi Trevor, > Yes, we made our own bootrom, which let us download program to FLASH > by CAN. Our bootrom have size 2K and placed at 0xF000 address of > HCS12 DG128 microcontroller. Boot procces consist of this parts: > 1. Host (PC or CAN-master) send 4 messages with specific ID. This > messages contains unique (4 double words) address of module. (Address > writed in protected area of bootrom and can not be rewrited) > 2. If module received its address it start receive other messages that > hold RAM-data. This way let us load any program to RAM. At then end > we send message this 'jump to RAM' command. > 3. RAM program had all needed Flash/EEPROM routines > (PROGRAM/ERASE/READ). For example host can send 'flash erase' > command or 'load flash' command. > 4. Then host done flash programming it's send 'reset command'. After > this module reboots (by watchdog) and starts again from bootrom. After > 0.3 sec passed, if no messages with address of modules comes, module > jumped from bootrom to main program in Flash. > All code (for bootrom and RAM program) writed in C. (assemler used > only for 'jump to address' routine). All works fine. It is simple to > write this programs (I have spend two weeks). If you want, I can send > sources. > WBR, lenux > -------------------------------------------------------- > To unsubscribe from this group, send an email to: > To learn more about Motorola Microcontrollers, please visit > http://www.motorola.com/mcu Yahoo! Groups Sponsor ADVERTISEMENT -------------------------------------------------------- To unsubscribe from this group, send an email to: To learn more about Motorola Microcontrollers, please visit http://www.motorola.com/mcu Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed] |
|
|