Re: Booting MPC565 by CAN/RS-232?
Baruch Einziger <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <[email protected]> |
We develop a boot loader for our own products and our customers. The boot loader burn to the first flash block and habdle the reset. It's check the checksum of the application start from the second page. than the boot loader can load the flash driver to internal ram for loading and burning or remap the interrupts vectors to 8000h. We also reduce the size of the vector table. Baruch E CSL-Tech. David Wybo <[email protected]> wrote:It is fairly straightforward, but there are a couple caveats. First you need a device driver for the port you want to flash from. However, if you are reflashing the internal flash, and your vector table is in this internal flash, then you need to be very careful about an interrupt river device driver, since at some point in time, you will be erasing the vector table. So, you can either programmatically move the vector table to some other memory, or run a polled device driver. Secondly, the code you are executing in order to do the download must execute from somewhere, and it also cannot be executing out of the internal flash while you are trying to reprogram it. So, either this code, I'll call it the bootloader, needs to be moved from internal flash to RAM, or it needs to execute from external flash, or it needs to be downloaded into RAM at the point in time when you want to reflash. The bootloader I wrote a while back, accepts a new application over CAN. WHile the old application is running, a message is sent to the target stating that a reflash is requested. The message is acknowledged, and the bootloader is downloaded into RAM. WHen the bootloader is completely downloaded, the application terminates and jumps to the bootloader, which then communicates to the host to download the new application for flashing. I happen to use CCP for the protocol, but you can use anything you want. Keep in mind that with only 8 byte data packets, CAN bootloading may take longer than a serial download. However, the time needed to reflash a 2 Mb application over CAN is not that bad. I also use an RTOS but that also is not necessary. Hope this helps. vijayanandl wrote: >Hi All, > I have a question regarding programming the internal flash. In my >current implementation I have programmed the MPC565 internal flash >using the JTAG interface. We have a working system now and to expand >its functions, now I am interested to program the internal flash using >the RS-232/CAN interface if possible. The question is I am currently >using the standard initialization, with program executing from internal >flash and I do not use an RTOS(its a bareboard) my environment is >Codewarrior and BDI. So what are the steps I need to take to achieve >this capability using RS-232/CAN interface? >Do I need to modify my initialization files, flash driver etc. Advice >in this regard will be really helpful. Thanks in advance. > >Regards >Vijay > > > > > >----------------------------------------------------------- >To learn more about Freescale Microcontrollers, please visit >http://www.freescale.com/mcu > > > >Yahoo! Groups Links > > > > > > > > > > -- David Wybo mailto:[email protected] RealTime Consultants, Inc. Phone: 248.345.6160 www.realtimeconsultantsinc.com ----------------------------------------------------------- To learn more about Freescale Microcontrollers, please visit http://www.freescale.com/mcu --------------------------------- YAHOO! GROUPS LINKS Visit your group "MPC500" on the web. To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. --------------------------------- --------------------------------- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/dN_tlB/TM --------------------------------------------------------------------~-> ----------------------------------------------------------- To learn more about Freescale Microcontrollers, please visit http://www.freescale.com/mcu Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/MPC500/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/