ROBOTC.net forums
http://robotc.net/forums/

Failed to erase flash memory
http://robotc.net/forums/viewtopic.php?f=11&t=2326
Page 1 of 1

Author:  jfd5041 [ Tue Apr 06, 2010 11:29 pm ]
Post subject:  Failed to erase flash memory

I borrowed a SquareBot that has been used for teaching with EasyC in order to learn something about RobotC for IFI. I downloaded for trial RobotC for IFI 2.02 and tried it on two different Windows XP systems. One system had never had any version of RobotC installed. The other system previously had RobotC for Mindstorms. Both systems failed to download the Master firmware to the Vex with this error message:

"Failed to erase flash memory"

The batteries are charged, RC mode works, the borrowed VEX programming cable kit seems to recognize (and be connected to) the correct COM port. I pressed the button on the orange serial-RJ box many times. The teacher assured me that they have had no problems with EasyC.

My interest is in RobotC. If RobotC 2.02 cannot work on this VEX microcontroller, then is there a version that will?

John

Author:  vnguyen [ Wed Apr 07, 2010 9:25 am ]
Post subject:  Re: Failed to erase flash memory

Hey John, try taking a look at this FAQ on robotc.net:

http://www.robotc.net/support/vex/#faq

If you go through all of the steps and still are having issues, let me know.

Author:  jfd5041 [ Wed Apr 07, 2010 2:22 pm ]
Post subject:  Re: Failed to erase flash memory

I downloaded and installed the Vex-provided setup file for the Prolific driver. That didn't fix the problem, so to make sure I was actually using it, I plugged in an additional Prolifics USB-serial cable that I have been using for a year or so with several other processors, including PIC, ARM.
Using Device Manager, I verified that the additional cable was NOT using the same driver - and then I disabled it.
In RobotC View->Preferences->Platform I chose the only COM port available, "COM4 (Prolific USB-to-Serial Comm Port)".
The error is the same. The green LED on the front of the controller flickers at a steady high rate. An orange LED somewhere inside flashes once every five seconds.
Later I reinstalled the driver for the additional cable and (no surprise) it turned out to be the same one. My conclusion is there is nothing special about the Vex-supplied driver, so that is not the source of my problems.
So I have indeed followed the steps listed in the FAQ reference. What else can I do?

Author:  vnguyen [ Thu Apr 08, 2010 9:27 am ]
Post subject:  Re: Failed to erase flash memory

Try using the IFI Loader to download Master Firmware 10 onto the VEX:

IFI Loader: http://content.vexrobotics.com/docs/ifi_loader-4vex.zip
Master Firmware 10: http://content.vexrobotics.com/docs/VEX ... _ver10.zip

Once that's done, download the ROBOTC firmware via ROBOTC.

Remember to power cycle the VEX after firmware gets downloaded. Refer to the FAQ again for steps on how to do this.

Author:  jfd5041 [ Thu Apr 08, 2010 11:40 am ]
Post subject:  Re: Failed to erase flash memory

Thanks. Still fails, but with more helpful error messages. The message sequence is

Establishing port connection...
No Controller found...
No programming board found...

I made sure the RJ plugs were firmly seated, DB-9 firmly screwed together, USB plug inserted all the way, and pushed the orange button many times once or twice before pressing DOWNLOAD in the IFI Loader box.

On the controller the green PRGM STATUS LED blinks steadily about once a second. The power LED is green and constant.

Could this be a hardware problem with the programming cable kit?
Where is the "programming board"?

Author:  vnguyen [ Thu Apr 08, 2010 12:56 pm ]
Post subject:  Re: Failed to erase flash memory

I've experienced orange programming cables that go bad so I wouldn't rule out that possibility. You wouldn't happen to have another one you could get a hold of would you? Maybe borrow one to rule out whether or not it's the cable.

Author:  jfd5041 [ Thu Apr 08, 2010 1:21 pm ]
Post subject:  Re: Failed to erase flash memory

Thanks, I'll try to find another cable.

One other thing I noticed was that the loader still gives exactly the same error messages when the Controller is powered off.

Author:  vnguyen [ Thu Apr 08, 2010 5:07 pm ]
Post subject:  Re: Failed to erase flash memory

Good to know.

Author:  jfd5041 [ Sun Apr 11, 2010 6:52 pm ]
Post subject:  Re: Failed to erase flash memory

Problem solved. It turned out to be bad cable (more than one). Here is the response I got from the teacher after I returned the whole set temporarily for testing:
"I did get it to work. It looks like the cables. One of my cables and Ron's cable will not connect. I used the IFI loader. Also, the driver for the comm port is by Prolific. I did have to do several restarts of the software and controller. It seems to be the only way to clear or refresh the comm connection."

Author:  vnguyen [ Mon Apr 12, 2010 10:26 am ]
Post subject:  Re: Failed to erase flash memory

Thanks for the clarification. Glad you got it working!

Author:  WhiteComet [ Wed Mar 23, 2011 6:25 pm ]
Post subject:  Re: Failed to erase flash memory

I also have this problem but I haven't fixed the problem. Problem is, I have a competition coming up in three days and I won't have time to buy a new cable (if that's the problem). I've tried the IFI Loader, and had the same results of:
No programming board found &
No Controller found
Is there any other possible way I could do this?

Author:  WhiteComet [ Wed Mar 23, 2011 6:30 pm ]
Post subject:  Re: Failed to erase flash memory

Now it says
Unkown Device id (0)

Author:  jbflot [ Thu Mar 31, 2011 6:02 pm ]
Post subject:  Re: Failed to erase flash memory

How old is your VEX PIC? If it's older, it may be wearing out and require a little extra voltage to write programs and firmware. Or conversely, if your batteries are worn out, they may not be providing enough voltage anymore. Try downloading firmware using one of the 9.6 V transmitter batteries.

Author:  vexmche123 [ Tue Jul 12, 2011 11:10 am ]
Post subject:  Re: Failed to erase flash memory

Im new to the whole Robot c and Vex prgramming thing and i have a pic controller and am having many issues. what does the button on the oragne cable do? I also have a problem i cant seem to load a program on my PIC controller it will not take it however if i step through it on the debug window it will do it. as soon as i unplug it, its wheels just pulse in all different directions. Here is one of my other post it supplies more detalis
Hello,
I am a high school student and new to programming and robotics. I have a vex PIC robot with ROBOTC software. My first program seems to work when the PC is connected to the controller. I can use the debugger to “step” line by line through the program. In other words, I can control the robot from my computer using the debugger window (step button) but it will not run when we unplug the cable. It does not seem to keep the program in the controller. It seems like it does not accept the “downloaded” program.

When unplugged from the computer the motors spin in pulses. Here is the program below. The robot’s front motors are set up different from the back ones hence the negatives.

Is there any way to confirm the program has transferred to the VEX controller?

Is there a way to completely clear the memory on the controller?

Does downloading completely write over (clear out) all previous code?

Any help would be appreciated.

#pragma config(Motor, port1, RF, tmotorNormal, openLoop)
#pragma config(Motor, port2, RR, tmotorNormal, openLoop)
#pragma config(Motor, port3, LR, tmotorNormal, openLoop)
#pragma config(Motor, port4, LF, tmotorNormal, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//

task main()
{
motor[port1] = 0; //stops
motor[port2] = 0;
motor[port3] = 0;
motor[port4] = 0;

wait1Msec(2000);

motor[port1] = -63; //run at half power
motor[port2] = -63;
motor[port3] = 63;
motor[port4] = 63;
wait1Msec(2000);

motor[port1] = 0; //stops
motor[port2] = 0;
motor[port3] = 0;
motor[port4] = 0;
}

Author:  jbflot [ Mon Jul 18, 2011 9:37 am ]
Post subject:  Re: Failed to erase flash memory

Quote:
what does the button on the oragne cable do?


Pressing the orange button will stop the program from running on the VEX. You may need to power cycle the VEX before you can download code over the programming cable again.

Quote:
Is there any way to confirm the program has transferred to the VEX controller?


If you have the VEX LCD screen it will display the name of the program being run. You can also see it if you are using the ROBOTC debugger.

Quote:
Is there a way to completely clear the memory on the controller?


You can redownload the ROBOTC firmware to the PIC.

Quote:
Does downloading completely write over (clear out) all previous code?


Yep.

It looks like your code will cause the robot to wait for 2 seconds, for the motors to spin for 2 seconds, and then stop. Can you describe in more detail how its behavior differs from what you expect?

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/