• Seems like hotmail /outlook is blocking emails from here so please refrain from using one of these accounts as you may not receive your authorization email.. many thanks

Request

smb2700

New Member
I need to flash with jtag:


MX29LV640T 4Mx16 TopB (8MB)
S29gl128p10 16Mx16 TopB (16MB)

Thanks
 

D3m0n

Administrator
Staff member
If you connect the bcusb to the devices that these flashes belong too , what detection does it give ? ,,, could you give me the output window and the JEDEC ID's it generates ?
 

smb2700

New Member
This is the log file for the S29gl128p10 16Mx16 TopB (16MB) (devid: 0x227E )


LibUsbDotNet version: 2.2.8.104
BlackcatUSB Script Engine running, build: 110
Welcome to Blackcat USB interfacing software, build: 260
Running on: Microsoft Windows XP Professional (32 bit)
Initializing EJTAG engine
Device connected in JTAG mode: 601
Engine setup successfully
Detected CPU ID: 0x635817F
Loading manufacturer data from device
Checking for a device specific script
Loading script: default.bcs
Setting device parameter (AMD Flash delay) to 0xFA
Setting device parameter (Memory Read Delay) to 0xFA
Creating memory interface (0x0 / 8388608 bytes)
Searching for CFI compliant Flash device
Flash device found at: 0x00000000
Unable to detect compatible Flash device
Script file (default.bcs) unloaded
Loading script: default.bcs
Setting device parameter (AMD Flash delay) to 0xFA
Setting device parameter (Memory Read Delay) to 0xFA
Creating memory interface (0x0 / 8388608 bytes)
Searching for CFI compliant Flash device
Flash device found at: 0x1E000000
Flash device detected: AMD S29GL320 (16777216 bytes)
Located at memory address: 0x1E000000
Programming mode: AMD (16 bit) fast-write algorithum
I have create this script, i read the cfe and tried to rewrite it, reading is ok, but no write :


# Script file for BCM6358 - 0x0635817F,
# This script is automatically executed when BlackcatUSB

MyDevice = "AGPF" #Name of device
CFEBase = 0x00
CFESize = 131072

JTAG.MemoryAddress(0x0)
JTAG.MemorySize(0x800000)
JTAG.MemoryInit()
JTAG.Flashbase(0x1E000000)
JTAG.FlashInit()

#removed this to gain performance. If you have reading issues, uncomment
#SetParam(3,0) #Sets read delay to 0
SetParam(2,220) #Sets the AMD flash delay to 220
SetParam(4,1) #Sets read mode to 1

t1 = Tab.Create(MyDevice)

Tab(t1).AddGroup("CFE",10,10,420,54)
Tab(t1).AddButton("ReadCFE","Read",130,30)
Tab(t1).AddButton("WriteCFE","Write",220,30)

CreateEvent(ReadCFE)
Status("Reading the CFE")
Tab(t1).ButtonDisable()
MyData = Flash.ReadVerify(CFEBase,CFESize)
if (MyData = Nothing)
Status("Error: data read back failed")
Tab(t1).ButtonEnable()
Exit Event
endif
Prompt = "Choose filename to save the firmware"
SaveFile(MyData,Prompt,"CFE.bin")
Status("Successfully read CFE from Flash")
Tab(t1).ButtonEnable()
EndEvent


CreateEvent(WriteCFE)
Tab(t1).ButtonDisable()
Prompt = "Choose a CFE to write into Flash"
MyData = OpenFile(Prompt,"CFE files (*.bin)|*.bin")
if (MyData = Nothing)
goto WriteCFEExit
endif
if not (Len(MyData) = CFESize)
Status("Error: File is not the size of the CFE")
goto WriteCFEExit
endif
Flash.Write(MyData,CFEBase,CFESize)
Status("New CFE successfully written")
WriteCFEExit:
Tab(t1).ButtonEnable()
EndEvent

EndEvent
Log Write test CFE:

LibUsbDotNet version: 2.2.8.104
BlackcatUSB Script Engine running, build: 110
Welcome to Blackcat USB interfacing software, build: 260
Running on: Microsoft Windows XP Professional (32 bit)
Initializing EJTAG engine
Device connected in JTAG mode: 601
Engine setup successfully
Detected CPU ID: 0x635817F
Loading manufacturer data from device
Checking for a device specific script
Loading script: default.bcs
Setting device parameter (AMD Flash delay) to 0xFA
Setting device parameter (Memory Read Delay) to 0xFA
Creating memory interface (0x0 / 8388608 bytes)
Searching for CFI compliant Flash device
Flash device found at: 0x00000000
Unable to detect compatible Flash device
Script file (default.bcs) unloaded
Loading script: agpf.bcs
Creating memory interface (0x0 / 8388608 bytes)
Flash device detected: AMD S29GL320 (16777216 bytes)
Located at memory address: 0x1E000000
Programming mode: AMD (16 bit) fast-write algorithum
Setting device parameter (AMD Flash delay) to 0xDC
Setting device parameter (Memory Read Mode) to 0x1
Button Hander::Calling Event: WriteCFE
Address 0x6: wrote 0x0 and read 0xFF (33355 mismatches)
Address 0x0: wrote 0x10 and read 0x0 (126690 mismatches)
Address 0x0: wrote 0x10 and read 0x0 (126694 mismatches)
Error: data verification at 0x0 failed!
Sucessfully flashed 131072 bytes
Now the router is brick.

Thanks
 

D3m0n

Administrator
Staff member
Try setting your SetParam(2,220) #Sets the AMD flash delay to 220 to Try setting your SetParam(2,500) You may get a better wirte with a higher delay .

I have noticed that it detects a different flash than the one you requested AMD S29GL320 / S29gl128
 

smb2700

New Member
With SetParam(2,500) write bad cfe.

The log is:

LibUsbDotNet version: 2.2.8.104
BlackcatUSB Script Engine running, build: 110
Welcome to Blackcat USB interfacing software, build: 260
Running on: Microsoft Windows XP Professional (32 bit)
Initializing EJTAG engine
Device connected in JTAG mode: 601
Engine setup successfully
Detected CPU ID: 0x635817F
Loading manufacturer data from device
Checking for a device specific script
Loading script: agpf.bcs
Creating memory interface (0x0 / 16777216 bytes)
Set AMD default write delay to: 100 ms
Flash device detected: AMD S29GL320 (16777216 bytes)
Located at memory address: 0x1E000000
Programming mode: AMD (16 bit) fast-write algorithum
Setting device parameter (AMD Flash delay) to 0x1F4
Setting device parameter (Memory Read Mode) to 0x1
Button Hander::Calling Event: WriteCFE
Address 0x146: wrote 0x0 and read 0xFF (2810 mismatches)
Address 0x0: wrote 0x10 and read 0x0 (94205 mismatches)
Address 0x0: wrote 0x10 and read 0x0 (94169 mismatches)
Error: data verification at 0x0 failed!
Sucessfully flashed 131072 bytes
 

D3m0n

Administrator
Staff member
The CFE you backed up before , is it a valid working CFE ? Are you able to load a full dump of the device back to the router without any errors.
 

smb2700

New Member
The CFE is good, i have load full dump with xilinx lpt interface and the router work. Why the write data with bcusb don't work?
 

D3m0n

Administrator
Staff member
I never coded the software , so i am not sure what the developer has implemented regarding read/write structures. At present we can increase /decrease the delays via the script , what you can try it to put it lower than 250 say to about 100 as it is a fast write algorithm implemented.

Try also loading your full dump via the bcusb and see if that gives you any errors .
 

smb2700

New Member
I can confirm that bcusb with S29gl128p does not work, the reading is ok, but the writing is full of errors. You can contact the software developer to fix the bug?
 

D3m0n

Administrator
Staff member
Can you tell me exactly what type of router this is ?

Also did you get errors trying to load a full working dump woth bcusb ?
Did you alter your delays to a lower value as well for example SetParam(2,50) you can go lower than 50 if need be , just to see if your error mismatches are still the same.

I will ask the developer to see if he has any advice , hence the reason i need to know the exact device etc.
 

D3m0n

Administrator
Staff member
Do you have a full dump of this ? in a previous post you mentioned using a full dump to recover the router with a xilinx LPT interface. Now when bcusb connects and you do a read of the full flash , do these 2 dumps you have correspond to one another ?

The reason i ask all these questions , is it will hopefully help the developer in assessing the issue. You have to remember bcusb was originally a modem tool for specific SB modems ,, it has since been through a few changes and we are hoping to add more devices/features to the software.

It is a lot harder to fully assess the problem without having the specific device to hand , but we will see what we can do. I can not promise you we will find a fix , but we will surely try.
 

smb2700

New Member
Sorry, I was wrong to write, to debrick the router I used the cfe bcusb I had previously saved.
The CFE saved bcusb is correct, if i load cfe with Xilinx the router works, if i load cfe with bcusb the router dont work.
 

D3m0n

Administrator
Staff member
Ok , now when you start the bcusb software , and load your script ,, do you get a flash tab ? if so are you able to read the whole flash ? I need to know this as there is a command that we need to try , but this will erase the whole flash , so we need to be sure we have a full working backup first.
 

smb2700

New Member
When you load the script I get the flash tab. However, I've got a full backup of the flash of my router, so we can make all tests you want. However I repeat that made ​​up the cfe bcusb work, because writing in the Xilinx router works. The problem is with writing bcusb, as you can see from the logs that I put in previous post. This is the program that I use with Xilinx, we are also the sources, I hope it will be useful to identify the problem.
http://repofulm.dyndns.org/index.php?dir=beghiero/modifiche/&file=alice_debrick03_bis.zip
 

D3m0n

Administrator
Staff member
I have passed this information onto the developer , hopefully he can give us some answers.
 

D3m0n

Administrator
Staff member
Still no reply from the developer, i am afraid. As soon as i hear from him regarding this device , i will reply ASAP.

In the meantime can you try this for me ...

Before executing a write cfe command , could you post this in the console window and then press enter

Ejctrl(0x10000)

I am intreested to see if this stops the CPU and allows you to write without any errors.
 

D3m0n

Administrator
Staff member
Tell me , what version of bcusb are you using RC13 or RC13.5 ?
The reason i ask is i have found some bugs in RC13.5 and was wondering if you have encountered the same errors. If you load a full flash into the Flash tab and try to flash , does the software crash ?

The developer is working on a new software release as we speak , but as the bugs in RC13.5 are there they could be carried over to the new release , so i am trying to see if anyone else is getting any issues.

This could be the cause of your mismatches as well.
 
Top