
Instructions for reprogramming the mixflash loader. Aug-11-2003.

Most of the following steps are explained in more detail below:

You will need three files:

  odette.hex - the bootstrap loader that runs from ram
  mflo.hex - the new mixflash loader program 
  mfhi.hex - a hi version of the new mixflash program

  Step 1 - Erase the nature sound flash area
  Step 2 - Download the odette loader  
  Step 3 - Use odette to load mfhi into the nature sound area
  Step 4 - Use the new mfhi to erase the old mixflash loader and sondrex application
  Step 5 - Download the mflo into its correct place using mfhi  
  Step 6 - Load Sondrex application code and Nature Sounds as usual. 

=============================================================================

  Step 1 - Erase the nature sound flash area

Erase the nature sound flash area by sending a 'v' ' ' command to the sondrex application.

You can see if this is now clear with the following view and sum commands under mymon.


=============================================================================

  Step 2 - Download the odette loader  

Make sure your serial port on the laptop is set to TWO STOP BITS.

The odette loader loads into onchip ram at FFF400.  The download file is
in hex and starts with the letter M and ends with a dot.  Two monitors
in the roms accept this format: mixbug which is part of Sondrex application and
the Erase or send data shell.   The only difference is that the erase or send
data shell runs the code after load whereas sondrex needs a go command.  Here I will
use sondrex, but if sondrex is not loaded, just send the file to the outer shell
and it will run:

  2a - send an escape to Sondrex, so it exits from the main application and
enters Mixbug.

LXMIXBUG+
>
  2b - send the odette.hex file down the craft port

>MFFF4007A ....
>
 >



  2c - optional, use the Mixbug D command to view the downloaded code

>d fff400
FFF400: 7A 07 00 FF FB F0 0F F6 40 F6 7E 84 73 60 47 FA 

  2d - use the mixbug G command to run odette.

>gfff400FFF400

The fff400 is echoed back and then odette starts.

(ER)ase or send data:

  
=============================================================================
  Step 3 - Use odette to load mfhi into the nature sound area

Use the normal sondrex download program to download mfhi into flash
using odette at address 0x80000.

When it is there, view its start and end using the md command of mymon or mixbug.
Here I show viewing the start with mixbug's d command and the end with mymon's md command.

LXMIXBUG+                                            
>d080000                                             
080000: 00 08 00 82 00 08 00 82 00 FF F0 0C 00 FF F0 0C 
>g080082080082LXMIXBUG+

mymon:
mymon:md 83100 10
083100  5E 08 0B 30  40 08 0F C0  7A 10 00 00  01 FF 0F 81    ^..0@...z.......
083110  0F C0 5E 08  30 A4 01 00  6D 75 01 00  6D 74 01 00    ..^.0...mu..mt..
083120  6D 76 54 70  6D 79 6D 6F  6E 3A 00 00  01 00 6D F6    mvTpmymon:....m.
083130  0F F6 7A 00  00 08 31 24  5E 08 14 96  01 00 6D 76    ..z...1$^.....mv  
083140  54 70 FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF    Tp..............  
083150  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF    ................  



=============================================================================
  Step 4 - Use the new mfhi to erase the old mixflash loader and sondrex application

 4a.  Run the mfhi flash loader by branching to its entry point.  Use either g from mixbug
or go from mymon.  Here I show mymon.


mymon:go 80082
Execute at $00080082


Mixerton flash BIOS. Commands are m ER+ v s :
No flash image
(ER)ase or send data:


 4b. Check the version number and load address of the flash loader you are now running
by sending the v command.

MIXERTON FLASH BIOS b 11-Aug-03 080080



 4c. Send the bottom erase command 'BER'.  This erases the lowest 1/8th of the flash.

  
  (ER)ase or send data:BER: S  1 Done.

You will get the 'done' message when done.

Note that as a safety check, if you issue this command when the load address is 80 (i.e. normal run of
mixflash) then you get the following error message: BER: would be suicide.



  4c. Issue the command BER  - bottom erase.  This will erase the bottom flash area
and a md of 0 will show all FF's.  

Power cycle or reset at this point will not work since there is no
reset vector.  However, resetting it with A19 grounded (pin 1 of U4)
during and just after reset should restore operation, since it will
read the reset vector from 0x80000 as being at 0x00000 and then jump
to the hiflash. Disconnect the grounding asap to avoid strain on the
pad.



  4d. After BER, enter mymon and view the low region - it should all be clear.

mymon:                                                                          
mymon:md 0 10
00  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF    ................
10  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF    ................
20  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF    ................
30  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF    ................
40  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF    ................
50  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF    ................
60  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF    ................

mymon:
mymon:sum 0 10000
Checksum = 0x00FF

  4e. exit from mymon back into the mfhi outer shell with
 
mymon:go 80082
Execute at $00080082


Mixerton flash BIOS. Commands are m ER+ v s :
No flash image
(ER)ase or send data:

=============================================================================
  Step 5 - Download the mflo into its correct place using mfhi  

   5a. Use the normal downloader to download mflo.hex into place.


   5b. When done, check it is there with mymon.

Mixerton flash BIOS. Commands are m ER+ v s :
MIXERTON FLASH BIOS b 11-Aug-03 080080
Mixerton ST.  CBG mymon low-level monitor.
mymon:md 0
00  00 00 00 82  00 00 00 82  00 FF F0 0C  00 FF F0 0C    ................
mymon:


  5c. Reset the card

It should now be possible to reset the card and enter the new flash
programmer.  Check this with the v command.

  5d. Note the new date and load point of 80.

Mixerton flash BIOS. Commands are m ER+ v s :
No flash image
(ER)ase or send data:MIXERTON FLASH BIOS b 11-Aug-03 80


  5e. If you wish, check that the erase functionality of the new mixflash loader
does indeed work by issuing an ER+ command.

(ER)ase or send data:

S E2 C1 C2 VC TFlash memory erased



=============================================================================
  Step 6 - Load Sondrex application code and Nature Sounds as usual. 


  6a Load Sondrex application code and Nature Sounds as usual. 

  6b check it is there with md command if you wish

                                                                     
Mixerton flash BIOS. Commands are m ER+ v s :                                   
Mixerton ST.  CBG mymon low-level monitor.
mymon:md 8000
8000  58 00 00 80  00 00 00 80  00 00 00 80  00 FF F0 0C    X...............
mymon:go 8000

  6c run it from mymon by branching to its start or install the jump vector
key thing.


=============================================================================

Note - the use of odette to load mfhi may not be necessary if your existing
installed flash loader can install it.





