Showing posts with label firmware. Show all posts
Showing posts with label firmware. Show all posts

Sunday, September 19, 2010

68HC11 Bootstrap mode

In 1999, I received a Super T-Comp; a 68HC11 based microcontroller board that is similar to the Handyboard.
While working with it I released the sacred smoke. I blew out 3 chips.
I repaired the damage, but I couldn't get it to work right again. So it sat in my toybox waiting for me to try again.

In 2010, I am taking a class in embedded systems; so it is time to try again.

Inspecting the board again, I found a bad chip that I missed; a NAND gate driving the external RAM. I will fix that this week.

Regardless I should be able to talk to T-Comp in Bootstrap mode. PCBug11 is the original tool for talking to 68HC11. It doesn't run on modern (fast) computers.

So I tried TeraTerm terminal software. Finally did established communication this morning.

68HC11 has 4 modes:
Single Chip: no external RAM
Expanded: external RAM
Bootstrap: single chip, using bootstrap loader in ROM
Test: Uh? don't know

Bootstrap Mode
Hold ModA and ModB low
Toggle Reset
Release ModA and ModB
within a second
send a byte over SCI (serial port) at 1200 Baud, No parity, 8 bits, 1 stop bit.

It is now ready to accept a 256 byte program. 68HC11 will echo bytes. Once it recieves 256 bytes, the program counter resets to $0000 and starts to run the loaded program. In theory.

Saturday, September 18, 2010

Hacking the PSP

Everyone has hacked the PSP to put non-Sony firmware on.
You can still run your games, AND install homebrew stuff.

This was the original goal when I bought my PSP. I got distracted by actually playing games.
I finally got around to doing it.

I have the GOW edition PSP slim, it had Sony firmware V3.94 installed.

I sort of followed the instructions that I found here

Things you need:
Pandora Battery - modified battery to allow access to the PSP bootstrap mode,
I borrowed one
Sony memory stick - 1Gb stick works fine
PSP Grader v0.008 - installs firmware, I got it here
modified PSP firmware - overwrites the Sony firmware, I got it here

Connect the PSP to your PC; start USB mode.
Copy the Sony memory stick to PC
Format the Sony memory stick

Start PSP Grader
Locate the eboot.pbp in the PSP_500_FW.zip
Download file to stick

Disconnect and power off the PSP
Remove battery
Insert memory stick (if you haven't)
Hold down the L button
Insert the Pandora Battery (often PSP auto-starts) and start PSP
Back up NAND
Restart PSP
Install 5.00 M33 (or similar)

Done.
I have spent all my time playing a Magic the Gathering Homebrew (Wagic) in stead of programming anything.

Wednesday, May 13, 2009

Loading firmware on the Surveyor

I had some success on the Surveyor this week.
I uploaded my own firmware.  

The firmware that comes with the camera board is impressive. It has "commandline" interpreter, PicoC script interpreter, Blob detection, and Edge detection built in.  But I needed to get blob centroids and a way to turn off the automatic color balance (which kept changing the colors of my green target to a pink target).  

I downloaded the latest firmware; this includes:
   source code
   srv1.ldr.115K 
         (firmware configured for 115Kbps UART communication)
   srv1.ldr.250K 
         (firmware configured for 232Kbps UART comm 
          using Matchport radio)

I figured that I should try to load the working, precompiled 115K firmware onto the board, before trying my own.  

The user's forum described the process for loading the new firmware; seemed simple enough.
However, I can't seem to get it to load right.    So now I erased perfectly good firmware off of my board, and couldn't get anything back on. D'oh!

Eventually, I found 2 pieces of information:

1) The Windows firmware loader that comes with Blackfin compiler, ldr.exe, only works with network connections.  Oh. That was annoying, cuz it looked like ldr.exe was connecting properly. To connect using serial comm in Windows, you need ldrviewer.exe
 
2) The new firmware is larger than 48K, this requires a two-stage process to put part in the L1 cache (very fast, but only 48K) and rest in SDRAM (slower, but bigger.)  So I have to download an old copy of the firmware that is 42K.  You load this into the L1 cache first.  Then you can use Xmodem to load the new big firmware into the L1 & SDRAM. 

There was a really good post to lay this out step by step.

Relief, now I felt good about compiling my own code and loading it up.
Make went okay, then I followed the process for loading the code.
I cycle power and, ... burp. A strange character shows up instead of the version number, then everything locks up.

I retried several times to no avail.  I asked for help on the forum and all that I got was "it works for me" ug.  

As it happens, I have been dreaming about this project all week with truly tortured sleep. So when I say the answer came to me in a dream, I think I earned it.   As I have said before, everyone assumes that you purchased the Matchport radio.  The radio uses 232Kbps serial communication.  I just assumed that the firmware would default to 115K.  So I go hunting around the source code and, tada:
   baud = 232000;
   \\ baud = 115200;
Duh! Everything HAD compiled and loaded right, but the camera was just talking too fast for hyperterm  to understand.

Okay, I can now load my custom firmware code, whoop!