Standalone DEMO board S19 -> QSPI -> EzPort relay...

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

Standalone DEMO board S19 -> QSPI -> EzPort relay...

3,446 Views
RichTestardi
Senior Contributor II

Hi all,

 

I've been meaning to do this for only about a year now, and since EzPort posts keeps on trickling in on the forum, I finally decided to do it tonite and hopefully save somebody some pain...

 

What I built is a standalone application for the M52221DEMO or M52233DEMO boards that you can connect to using a terminal emulator either by:

 

* RS232 (uart 0, 9600 baud, 8 data bits, no parity, xon/xoff flow control),

* a USB virtual serial port on the 52221, or

* a raw TCP/IP port (DHCP, port 1234) on the 52233 .

 

You can then type the "download" command into your terminal emulator and paste in an S19 file and the DEMO board will relay it out QSPI to the EzPort of a waiting target board.  It means you can flash any kind of ColdFire part with EzPort thru either an M52221DEMO or M52233DEMO board.  I have no reason to believe this same code won't work on a M5211DEMO or M52259DEMOKIT board, but I did not try it there.

 

Basically, you just need a "clone cable" from the DEMO board to your target board as follows (from the online help):

 

> help clone
clone cable:
  master     slave
  ---------  ----------------
  qspi_clk   qspi_clk (ezpck)
  qspi_din   qspi_dout (ezpq)
  qspi_dout  qspi_din (ezpd)
  qspi_cs0   rcon* (ezpcs*)
  scl        rsti*
  vbus       vbus
  vdd        vdd
> _

 

Then type the "download" command.  Then paste in your S19 file into the terminal emulator.  It looks like:

 

Welcome to EzPort for Freescale MCF52233 v1.50i!
http://www.cpustick.com
(checksum 0x929c)
NOT SECURE
> download
paste S19 upgrade file now...
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
.....................
clone done!
> _

 

I have attached S19 files for both DEMO boards and a zip of the modified "skeleton" project from http://www.cpustick.com/downloads.htm (the zip will be in the next reply)

 

-- Rich

(I edited the message to try to get my bullets back!
 
Message Edited by Rich T on 2009-03-18 11:15 PM
Message Edited by t.dowe on 2009-09-02 04:38 PM
Labels (1)
0 Kudos
7 Replies

618 Views
MPotts
Contributor III

Hi Rich,

 

I am trying to run your ezport project on a M52259DEMO board. I created a new Skeleton 52259 target and changed everything I could see in the settings to reference MCF52259, however when I compile I get a lot of undefined identifiers such as MCF_GPIO_PDDPAR (in startup.c). Any suggestions, I am sure it is something simple like a modified #include file?

 

Thanks,

Mark

0 Kudos

618 Views
RichTestardi
Senior Contributor II

Hi Mark,

 

Sorry for the delay -- I've been off the board as I finally had to take a real (paying :smileyhappy: job...

 

The best way to get the skeleton code working is to just unpack it from the zip archive here (http://www.cpustick.com/downloads/skeleton.zip) and then double-click the project/project.mcp file to start CodeWarrior (7.x).  Then select "CPUStick 52259" from the project drop-down list and click "Make" -- it should build without a hitch (I just did these steps).

 

Once you have that done, then you can start removing things you don't want or need, without much trouble.  But if you're just trying to do the EzPort relay, what you have should work fine (as does a binary download of StickOS from http://www.cpustick.com/downloads.htm).

 

It's probably best to just e-mail me if you have questions (rich@testardi.com) as my board coverage will be spotty for a while now.  Let me know if you have other issues.

 

-- Rich

0 Kudos

618 Views
thinkchip
Contributor II

Hi, this SO supports the MCF51JM128VLD? best regards

sorry for my bad english

0 Kudos

618 Views
RichTestardi
Senior Contributor II

Hi,

 

Yes, both StickOS and skeleton.zip run on the 51JM128 -- you can download StickOS from the downloads page (http://www.cpustick.com/downloads.htm) and run it and use the "download <frequency>" command to use it as a S19 -> QSPI -> EzPort relay.

 

You can talk to the 51JM128 either thru UART 1 or thru the USB virtual com port, as shown in the MCU details here: http://www.cpustick.com/downloads/freescale.pdf

 

Note that the 51JM128 can be used as the *source* of the S19 -> QSPI -> EzPort relay (because it has a QSPI port), but cannot be used at the *destination* (since it does not have EzPort).

 

-- Rich

0 Kudos

618 Views
RichTestardi
Senior Contributor II

And here's the zip, with ezport.mcp.

 

The source file of interest is skeleton/skeleton.c.

 

One word of caution: please be sure the target clocks that the code assumes are correct for your boards -- if they are not, you will need to recompile the DEMO board S19's.

 

The target clocks that the code assumes are based on the *DEMO* board (i.e., I expect you to clone from 21 to 21 or 33 to 33), as follows:

 

#if MCF52221 || MCF52259
#define SLAVE_FSYS    8000000  // frequency of target board
#elif MCF52233
#define SLAVE_FSYS    5000000  // frequency of target board
#endif

 

These represent the clocks that the target MCU is running with when in EzPort mode (not in normal run mode).

 

-- Rich

 

ezport.zip

Message Edited by Rich T on 2009-03-18 11:21 PM
Message Edited by t.dowe on 2009-09-02 04:39 PM
0 Kudos

618 Views
efk
Contributor I
Hello,

Thank you for your help.

I use a firmware for M52211 (usb) and M52235 (Ethernet) with secure flash memory option.
From this firmware, it is possible to call a mass erase function via a usb/Ethernet command.
But i am afraid of a software crash which will block the access of the mass erase command.

So i am looking for a program which would send an EzPort bulk erase (BE) command.
Then, from a DEMO board + EzPort link, i could be able to "format" the flash memory of the secured board, and recover the access of its flash ram via the BDM port.

Could it be possible for you to propose such S19 file, which will run only the EzPort bulk erase (BE) command ?

Best Regards.
0 Kudos

618 Views
RichTestardi
Senior Contributor II

Hi,

 

The zip I posted starts out with a bulk erase (I use it when I accidentally secure my parts, as a trivial way to unsecure them!)...  So you can use it and then simply not paste the S19 file, and it should do what you want.

 

Alternatively, since then, we included this functionality directly in StickOS...  It sounds like you might have an M52233DEMO board, so you can simply load StickOS on it (download the S19 from http://www.cpustick.com/downloads.htm) and then you don't have to build anything...  Boot and the M52233DEMO will get a DHCP IP address and you can telnet to port 1234 and issue a "download" command, with the parameter being the clock frequency of the target board in EzPort Mode, like "download 5000000", and it will issue the bulk erase.  Then you can just type garbage, like "aaa<Enter>" and the S19 download will abort.  Alternately, you can connect to the M52233DEMO using the UART set to 9600/8/n on its COM port and do the same thing.

 

Also, I have used this same approach to unsecure DEMO boards (it works in both directions), but you have to wire up the RCON* pin to the DEMO board expansion connector to do this.  If you're using flash security, it is only a matter of time before you turn your DEMO board into a brick, so it is best to have an extra one on hand so you can fix it this way. :smileyhappy:

 

-- Rich

 

0 Kudos