Skip to main content

Topics

This section allows you to view all Topics made by this member. Note that you can only see Topics made in areas you currently have access to.

Topics - mr_skater99

1
Bus Pirate Support / Coldfire MCF52235 EzPort - Help Please
HI all,

I'm reasonably new at this - so hoping someone can give me a nudge in a the right direction.  This will probably be a slightly longer post - but i want to make sure i put in all the necessary info.

My end game is to write (and also dump) the firmware of a ColdFire MCF52235 micro controller with my BusPirate using the ColdFire's EzPort and the BusPirate in SPI mode.

I'm using profmadd's Ruby lib (viewtopic.php?f=28&t=2005) as i'm familiar with Ruby.

First step was figuring out the SPI settings for my specific setup, which i've done and tested using the BusPirate console directly.

After setting all of the SPI options, i can set CS high, power up my board with the ColdFire on it, and the ColdFire starts in SPI mode.

I can verify this by reading the status register of the chip, setting write enable and then reading back the status register again to see that its changed.

The command list for the EzPort is in section 21.4 of this PDF - http://www.dediprog.com/EZPORT_interface.pdf

Here is a sample from the BusPirate console:


SPI>{0x05 0x00]
/CS ENABLED
WRITE: 0x05 READ: 0xFF
WRITE: 0x00 READ: 0x00
/CS DISABLED
SPI>[0x06]
/CS ENABLED
WRITE: 0x06
/CS DISABLED
SPI>{0x05 0x00]
/CS ENABLED
WRITE: 0x05 READ: 0xFF
WRITE: 0x00 READ: 0x02
/CS DISABLED

I'm now trying to do the same thing with the attached Ruby code (lines 79-88 of wh3.rb - renamed as .txt to attach) - but its failing completely.

I'm using this page as a reference for the BusPirate - http://dangerousprototypes.com/docs/SPI_(binary)

Does anyone have any idea of what i might be doing wrong?  wh3.rb works to the point of setting the BusPirate up in SPI mode, and enabling CS so i can power up the board and have the ColdFire in SPI mode.  If i then try the BusPirate console, i can communicate with the EzPort, but the lines to do the same thing in Ruby don't work.

Any help would be greatly appreciated.  Once i get this going, i'll then need to look at doing a bulk write of one of the firmware files i have here.

Thanks!

Scotty
2
Bus Pirate Support / Bricked? Suggestions?
Hi All,

So up until about an hour ago had a working BPv3 with bootloader 4.1 and firmware 4.1  I decided to upgrade to firmware 5.1 and bootloader 4.4 

Firmware upgrade went fine.  After a reset had the nice new terminal.  (windows upgrade with ds30 gui).

I then tried to upgrade the bootloader the same way and it failed with an error - that i don't recall right now.  And STUPID me unplugged the BP and plugged it back in to try again.

Now ds30 gui spits out Found Unknown device id(193) fw ver 9.9.9

If i run the pirate-loader with 'hi' on a windows command line i get -

+++++++++++++++++++++++++++++++++++++++++++

  Pirate-Loader for BP with Bootloader v4+

  Loader version: 1.0.2  OS: WINDOWS

+++++++++++++++++++++++++++++++++++++++++++



Opening serial device COM4...OK

Configuring serial port settings...OK

Sending Hello to the Bootloader...OK



Device ID: PIC24FJ64GA002 [d4]

Bootloader version: 1,02

Which seems totally weird (1.2!).

So i then thought to try the v2-v4 bootloader upgrade process again - on windows PIC24F won;t open a connection to the BP (COM4 9600 baud) and if i try it on linux with P24qy.py i get:
Using Serial Port /dev/bus_pirate @ 9600
Reading 4 bytes from address 0x00FF0000
RX Error:  0  bytes received
   Error reading from device!
Device with ID: 65535 not listed in the config file!

Any thoughts?  Have i killed it completely?  If plug in the BP with the PGC and PGD pins jumpered i get the mode light, and vice versa.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01192283056session_write_close ( )...(null):0
20.01222414648ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01222415424Database_MySQL->query( ).../DatabaseHandler.php:119
40.05672554160Database_MySQL->error( ).../Db-mysql.class.php:273