Welcome, Guest. Please Login.
Surveyor Corporation Surveyor SRV-1
Home Help Search Login

Surveyor Robotics Forum

Welcome to the user support forum for Surveyor SRV-1 robots, SRV-1 robot controllers and SVS stereo vision systems. To register for this forum, please send an email to support@surveyor.com which includes your desired forum user name, your registration email address, and a brief explanation of why you wish to join, and we will create a forum account for you.

Please note that there is a Search button in the forum toolbar for forum topics. Another effective search method for the entire surveyor.com site is to use Google, e.g. "xyz site://www.surveyor.com" where "xyz" is the search topic.



Pages: 1 2 3 ... 6
Send Topic Print
restoring SRV-1 Blackfin flash firmware (Read 84607 times)
Erik
YaBB Newbies
*




Posts: 11
restoring SRV-1 Blackfin flash firmware
03/11/08 at 1:49am
 
Hi
 
In order to solve a problem with my blackfin, I updated the latest firmware to it- srv-blackfin-031008
I uploaded the srv1.ldr file successfully to the flash buffer, and the zZ command also gave me a positive reply.
However, after restarting the robot, it responds to nothing anymore! I can still get a connection, but it doesn't seem
to recognize the commands I'm passing through.
 
HELP!
Back to top
 
« Last Edit: 03/13/08 at 8:09am by admin »  
  IP Logged
admin
YaBB Administrator
*****




Posts: 3606
Re: blackfin crashed
Reply #1 - 12/18/08 at 7:18am
 
Do the yellow LED's on the Blackfin board not turn on within a few seconds of reseting the processor?  If so, then the firmware has somehow been lost.  Normally this happens if the firmware upload was incomplete.
 
Here are the steps for loading a new flash image into the Blackfin via the processor's UART Boot Mode with the Matchport, using Linux or Windows if the firmware is corrupted.  Note that there are different instructions posted at the bottom of this message for recovering via a direct 3.3V UART connection at 115kbps rather than a wireless connection via the Matchport.  But for Matchport users, here are the steps to follow:
 
0. Make sure the robot is powered on, and stays powered on.  If you have already installed the Blackfin bfin-elf-gcc toolchain, you will already have the command bfin-elf-ldr on your system.  Otherwise, download and install ldr-utils on your linux system from http://www.surveyor.com/blackfin/ldr-utils.zip
There is also a working version of ldr.exe for Windows that can be used for this procedure - http://www.surveyor.com/blackfin/ldr-for-windows.zip
 
1.  Download a special 115kbps version of SRV-1 firmware from here -  
    http://www.surveyor.com/blackfin/srv1.ldr.recovery
 
2. Connect to the Matchport configuration menu via telnet or terminal connection to port 9999.  In the section labeled "Channel 1 -> Serial", change the baud rate to 115200
 
Change Setup:
  0 Server
  1 Channel 1
  2 Channel 2
  3 E-mail
  4 WLAN
  5 Expert
  6 Security
  7 Defaults
  8 Exit without save
  9 Save and exit            Your choice ? 1
 
  Channel 1 Serial (1) -  
     for Baudrate, enter 115200
     for flow control, enter 0   (this disables hardware flow control)
     skip the rest of the options
  Save and Exit (9)
 
3. On the robot, remove the jumper on pins 7-8 in block J1 of the processor card
 
4. Now, back in a terminal window, make sure you have installed ldr, and
move to the folder with the downloaded srv1.ldr.recovery and the current srv1.ldr you want to install.
 
5. From this folder, issue the command
 
[localhost SRV]# ldr -l -v srv1.ldr.recovery 169.254.0.10:10001
     or
[localhost SRV]# bfin-elf-ldr -l -v srv1.ldr.recovery 169.254.0.10:10001
     if you already have the Blackfin compiler toolchain installed
 
6. Momentarily place the removed jumper on pins 1-2 in block J1 on the processor card.  If the ldr operation was successful, you should see the yellow LED's flash when the loading has completed.  
 
You should see something like this -  
 
> Loading LDR srv1.ldr..recovery ... auto detected LDR as 'BF537'
> OK!
> Connecting to remote target '169.254.0.10' on port '10001' ... OK!
> Trying to send autobaud ... OK!
> Trying to read autobaud ... OK!
> Checking autobaud ... OK!
> Autobaud result: 50bps 0.19mhz (header:0xBF DLL:0x18 DLH:0x00 fin:0x00)
> Sending blocks of DXE 1 ... [10:6208 bytes] [10:7400 bytes] [10:19448> bytes] [3/OK!
> You may want to run minicom or kermit now
> Quick tip: run 'ldr <ldr> <tty> && minicom'
 
You're not finished - the firmware is running in memory, but still needs to be uploaded and stored in flash memory.
 
7. Return the jumper to pins 7-8 in block J1
 
8.  Now connect via nc (netchat) to the robot - nc 169.254.0.10 10001.  From Windows, use Tera Term.  Type 'V' followed by ENTER, and you should get a version string for the firmware.
 
9.  Now you need to transfer the current srv1.ldr using the XMODEM protocol into the flash buffer and then write it to flash.  From Linux, use nc 169.254.0.10 10001, type 'X' followed by ENTER.  From Windows, use Tera Term for the XMODEM transfer.
 
From your terminal program, you should start to see a sequence of 'CCC' characters.  
 
If on Windows in Tera Term, ALF-F T X S to get to the send file menu.  
 
If on Linux, exit nc, and run the following
 
     lsz -Xkbv --tcp-client 169.254.0.10:10001 srv1.ldr
 
Then restart nc
 
Once the transfer is complete, from Tera Term or nc, type 'zZ' followed by ENTER.  If you were successful, you will see
      "##zZ boot image write count: 131072"
 
10. Now change the settings on the Matchport back to 2500k, hw flow -  
Telnet or connect via terminal again to port 9999. and
 
Change Setup:
  0 Server
  1 Channel 1
  2 Channel 2
  3 E-mail
  4 WLAN
  5 Expert
  6 Security
  7 Defaults
  8 Exit without save
  9 Save and exit            Your choice ? 1
 
  Channel 1 Serial (1) -  
     for Baudrate, enter -1
     for divisor, enter 2
     for flow control, enter 2
     further down, for FlushMode, enter 80
     for Pack Cntrl, enter C0
     for InterCh Time, enter 3
     skip the rest of the options
Save and exit (9)  
 
At this point, you should be able to reboot the robot, and everything should be running correctly.
 
===================================
 
In case you are wondering why srv1.ldr has to be transfered twice - srv1.ldr is a wrapper for srv1.bin, which is the actual binary image of the firmware. srv.1dr adds some startup code that moves srv.bin from low memory to its proper location at 0xff80xxxx and then jumps to the right address to start execution. If you were testing code using gdb and a JTAG cable, you would actually tell gdb to load srv1.bin, not srv1.ldr.  Because the Blackfin boot loader unwraps srv1.bin from srv1.ldr, there's no longer a copy of srv1.ldr around to write to flash, so we have to transfer it a 2nd time.
 
========================================
 
Note that if you are doing this recovery with a direct 3.3V UART connection at 115kbps, use these instructions instead -
 
1.  Download a special 115kbps version of SRV-1 firmware from here -
   http://www.surveyor.com/blackfin/srv1.ldr.recovery
 
2. Download and run http://www.dolomitics.com/downloads/ldrviewer.html
Load the recovery file
 
3. Remove jumper on 7/8, then power up Blackfin
 
4. Run UART Boot, uncheck 'Evaluate CTS'
click 'Test Port'
short pins 1/2
Click Autobaud
click Send DXE
wait until you see 'done' and you see the yellow LED's cycle
 
5. Put jumper back onto 7/8, close ldrViewer
 
6. Open up a terminal program with baud rate set to 115200, type V to see the version string displayed, then type X, wait for CCCC, then do XModem transfer of correct ldr file.
Wait until done, then type zZ to save firmware to boot flash sectors
 
7. Reset or power cycle Blackfin
Back to top
 
« Last Edit: 12/16/09 at 7:31am by admin »  

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
AndreiSk
Full Member
***




Posts: 166
Re: restoring SRV-1 Blackfin flash firmware
Reply #2 - 01/18/09 at 3:38pm
 
Yes, it happened for me too Sad
I wrote wrong firmware and communication was frozen (my own mistake).
I restored firmware successfully and filled my firmware without mistake too.
Only one question still remained for me.
How to  
====
12. Now change the settings on the Matchport back to 2500k, hw flow -    
Make the correct changes in the section labeled "Channel 1 -> Serial  
Settings":  
Protocol: RS232  
Flow Control: Hardware  
Baud Rate: -1  
Divisor:  2  
Data Bits: 8  
Parity: None  
Stop Bits: 1
====
 
If I have "Device Server Configuration Manager Version 1.6.0.4 " for SRV1q
and last value for speed is 230400 (http://81.17.152.8/download/test/serial1.jpg)
It is really slow, before my fault I had 2500kbps it was able to show ~9 images per second,
now I have only one per second.
Help!
Back to top
 
 
  IP Logged
akeel.laila
YaBB Newbies
*




Posts: 3
Re: restoring SRV-1 Blackfin flash firmware
Reply #3 - 02/08/09 at 3:02pm
 
I tried following the prescribed procedure to restore the firmware. However, when I perform step 5 (command: ldr -l -v srv1.ldr.recovery 169.254.0.12:10001), I get the following messages:
 
Loading LDR srv1.ldr.recovery ... auto detected LDR as 'BF537' OK!
Connecting to remote target '169.254.0.12' on port '10001' ... OK!
Trying to send autobaud ... OK!
Trying to read autobaud ... ldr: received signal 14: timeout while sending; aborting
 
Any suggestions?
 
Thanks.
Back to top
 
« Last Edit: 06/11/09 at 6:48am by admin »  
  IP Logged
admin
YaBB Administrator
*****




Posts: 3606
Re: restoring SRV-1 Blackfin flash firmware
Reply #4 - 02/08/09 at 3:11pm
 
It may take a few tries.  You have to reset the processor (briefly jumper pins 1 and 2 on the J1 header) before the autobaud process.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
AndreiSk
Full Member
***




Posts: 166
Re: restoring SRV-1 Blackfin flash firmware
Reply #5 - 02/08/09 at 3:15pm
 
I tried make it may be 50 times before success. Also I soldered push button to pin 1-2 to make short connection Smiley It is really crazy operation for me, I restored firmware two times...
I wrote long bat file for it:
===============
ldr -l -v srv1.ldr.recovery 192.168.0.33:10001
pause
ldr -l -v srv1.ldr.recovery 192.168.0.33:10001
pause
ldr -l -v srv1.ldr.recovery 192.168.0.33:10001
pause
ldr -l -v srv1.ldr.recovery 192.168.0.33:10001
pause
ldr -l -v srv1.ldr.recovery 192.168.0.33:10001
pause
===============
 
And what you need is see when "##Version ..." will appear at cmd.exe window.
Back to top
 
« Last Edit: 06/11/09 at 6:49am by admin »  
  IP Logged
akeel.laila
YaBB Newbies
*




Posts: 3
Re: restoring SRV-1 Blackfin flash firmware
Reply #6 - 02/08/09 at 4:09pm
 
I'd like to clarify...
 
Do I need to jumper pins 1 and 2 just before sending the ldr command, or just after (when it is waiting at step: Trying to read autobaud ... ) or at some other point?
Back to top
 
 
  IP Logged
admin
YaBB Administrator
*****




Posts: 3606
Re: restoring SRV-1 Blackfin flash firmware
Reply #7 - 02/08/09 at 5:16pm
 
You only jumper pins 1-2 briefly - just a fraction of a second.  That's all that is required to reset the processor.
 
Try it both ways, either before the LDR command or after the LDR command starts.  As I recall, my first LDR fails, but the reset clears things for the next LDR call.
Back to top
 
« Last Edit: 02/08/09 at 5:17pm by admin »  

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
shawnjgoff
Full Member
***


an electrical
engineer in the
making

Posts: 132
Re: restoring SRV-1 Blackfin flash firmware
Reply #8 - 02/15/09 at 11:44am
 
Code:
$ bfin-elf-ldr -l -v ./srv1.ldr.recovery /dev/ttyUSB0
Loading LDR ./srv1.ldr.recovery ... auto detected LDR as 'BF537' compatible format
OK!
Opening /dev/ttyUSB0 ... OK!
Configuring terminal I/O ... [getattr] [setattr] [speed:115200] OK!
Trying to send autobaud ... OK!
Trying to read autobaud ... Failed: Bad file descriptor
 


 
Any suggestions?
Back to top
 
« Last Edit: 06/11/09 at 6:50am by admin »  
WWW   IP Logged
admin
YaBB Administrator
*****




Posts: 3606
Re: restoring SRV-1 Blackfin flash firmware
Reply #9 - 02/15/09 at 12:27pm
 
I haven't seen that error before.  Have you confirmed that your USB interface is working with other devices ?
 
Back to top
 
« Last Edit: 02/15/09 at 12:28pm by admin »  

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
shawnjgoff
Full Member
***


an electrical
engineer in the
making

Posts: 132
Re: restoring SRV-1 Blackfin flash firmware
Reply #10 - 02/15/09 at 4:09pm
 
The USB was fine. So was the cable and the USB/TTL converter. I was able to restore my system by borrowing a Windows system and using ldrviewer.
Back to top
 
 
WWW   IP Logged
admin
YaBB Administrator
*****




Posts: 3606
Re: restoring SRV-1 Blackfin flash firmware
Reply #11 - 02/15/09 at 4:20pm
 
My mistake - bfin-elf-ldr.exe only supports network communication, not serial communication on Windows.  The /dev/ttyUSB0 reference confused me, as that's Unix.  ldrviewer.exe is the right tool for Windows.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
shawnjgoff
Full Member
***


an electrical
engineer in the
making

Posts: 132
Re: restoring SRV-1 Blackfin flash firmware
Reply #12 - 02/15/09 at 4:44pm
 
I was using it on Linux. I used the Windows machine just so I could use the other program.
Back to top
 
 
WWW   IP Logged
mipos
YaBB Newbies
*




Posts: 6
Re: restoring SRV-1 Blackfin flash firmware
Reply #13 - 02/20/09 at 2:35pm
 
I have same problem as the first message.
 
I go through all points posted by admin -> after sending srv1.ldr I send zZ and everything is OK, robot run via terminal, but when I start using java console program or when I reset or turn off the robot and then turn on - robot doesn´t communicate, red and yellow leds are light on, but when i try to connect via terminal and sent V or use java console program - nothing happens.
 
Please help
Back to top
 
 
  IP Logged
admin
YaBB Administrator
*****




Posts: 3606
Re: restoring SRV-1 Blackfin flash firmware
Reply #14 - 02/20/09 at 2:43pm
 
If the yellow LED's are flashing, then it's probably a mismatch in baud rate between the Matchport and Blackfin, or possibly a Matchport configuration issue.    
 
Did you upload and zZ save a 2500kbps version of srv1.ldr ?  
 
Did you reset the Matchport settings via telnet to Matchport on port 9999 ?
 
Expert (5) -  
     for CPU performance, enter FF
     for clk?, enter 81
     change MTU Size from 1400 to 1024
     skip the rest of the options
  Channel 1 Serial (1) -  
     for Baudrate, enter -1
     for divisor, enter 2
     for flow control, enter 2
     further down, for FlushMode, enter 80
     for Pack Cntrl, enter C0
     for InterCh Time, enter 3
     skip the rest of the options
  Save and exit (9)
 
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
Pages: 1 2 3 ... 6
Send Topic Print