Upgade 9S12B128 software through USB flash driver

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

Upgade 9S12B128 software through USB flash driver

6,556 Views
Shirley
Contributor I
Hi all:

We have a product that has MC9S12B128.

Inorder for the customer upgading the firmware in the field, we are going to put USB controller on the processor board.

When our customer recieved the updated .S19 file,they can copy the file on an USB flash drive and then plug it into USB socket on the unit.

Our unit should recognize it automatically(like the PC does) and then start downloading(This is the part that I don't know how).

Is this project doable?

Please help

Shirley
Labels (1)
0 Kudos
6 Replies

695 Views
Technoman64
Contributor III

Have you seen this USB device?

The MAX3421E USB peripheral/host controller contains the digital logic and analog circuitry necessary to implement a full-speed USB peripheral or a full-/low-speed host compliant to USB specification rev 2.0. A built-in transceiver features ±15kV ESD protection and programmable USB connect and disconnect. An internal serial interface engine (SIE) handles low-level USB protocol details such as error checking and bus retries. The MAX3421E operates using a register set accessed by an SPI™ interface that operates up to 26MHz. Any SPI master (microprocessor, ASIC, DSP, etc.) can add USB peripheral or host functionality using the simple 3- or 4-wire SPI interface.

The MAX3421E makes the vast collection of USB peripherals available to any microprocessor, ASIC, or DSP when it operates as a USB host. For point-to-point solutions, for example, a USB keyboard or mouse interfaced to an embedded system, the firmware that operates the MAX3421E can be simple since only a targeted device is supported.

Internal level translators allow the SPI interface to run at a system voltage between 1.4V and 3.6V. USB-timed operations are done inside the MAX3421E with interrupts provided at completion so an SPI master does not need timers to meet USB timing requirements. The MAX3421E includes eight general-purpose inputs and outputs so any microprocessor that uses I/O pins to implement the SPI interface can reclaim the I/O pins and gain additional ones.

0 Kudos

694 Views
Technoman64
Contributor III

Here is a company that offers USB MASS Storage Host and Device drivers for embedded systems and they advertise it has a small memory footprint.

http://www.jungo.com/embedded_usb_mass_storage.html

Not sure what the cost is. They do have a form at the bottom of the page to request more info though.

0 Kudos

694 Views
rocco
Senior Contributor II
Hi, Shirley:

What you are considering is a lot harder than it sounds.

The reason is that it is much easier to create a USB device than it is to create a USB host. The code to provide a USB host and the USB-disk file system may be larger than 9S12B128 can support. All of the Freescale USB micros are designed to be devices, not hosts.

There are USB-On-The-Go devices coming to market, and that may help in you situation. But I don't know if USB-OTG support flash disks.

Another type of memory card (Compact-flash card or secure-digital card) may be a lot easier. I'm doing this now with the HC08GP32, after the customer asked for a USB flash disk, and I said NFW.

Hope that helps (but maybe not).
0 Kudos

694 Views
Shirley
Contributor I
Thanks for all of the valuable advice.

I'm aware of the difficulty of the USB host too.

What is the interface for the CF card to the processor?
I know the 9S12UF32 has smartmedia interface(can this be communicated with CF card?), but the 9S12B series doesn't have it.
Using CF card may be not economical for my application.

Freescale has a standalone RS232-BDM programmer.
It is portable and convenient, but it is not USB.
So I'm thinking of making a USB-BDM standalone programmer and writtiing an PC interface for it. Thus may solve the problem and cost less.

Shirley
0 Kudos

694 Views
glork
Contributor I


rocco wrote:
Hi, Shirley:

What you are considering is a lot harder than it sounds.

The reason is that it is much easier to create a USB device than it is to create a USB host. The code to provide a USB host and the USB-disk file system may be larger than 9S12B128 can support. All of the Freescale USB micros are designed to be devices, not hosts.

There are USB-On-The-Go devices coming to market, and that may help in you situation. But I don't know if USB-OTG support flash disks.

Another type of memory card (Compact-flash card or secure-digital card) may be a lot easier. I'm doing this now with the HC08GP32, after the customer asked for a USB flash disk, and I said NFW.

Hope that helps (but maybe not).




Hi Rocco.
You are correct re the difficulty of usb. I've been burned and now I avoid it at all costs.

I have an up-coming design that will require interfacing to a CF card and reading/writing dos (windows) files.
I've already developed the CF card interface and low-level driver in a previous design but I just used a custom file structure on the CF card.
Does your experience include reading/writing dos files? If so can you direct me to the file format specification?
ron
0 Kudos

694 Views
imajeff
Contributor III
glork reminds me...
It is easier to interface with a memory card itself than it is to implement a USB host on the MCU.

Therefore, you might see fit to include a MC9S12UF32 and instead of using the USB part, have a socket for a small memory card such as SD/MMC. That sounds not only practical for updates, but could even be designed to keep the card inserted, for much higher data storage which doesn't get coppied to internal Flash.
0 Kudos