s25fl256 flash ic

Here we discuss the JTAG on platforms. CPU,CPLD etc.
Post Reply
sangram
Junior Member
Posts: 20
Joined: Thu Feb 13, 2014 8:33 pm
Location: i dont know,
Contact:

s25fl256 flash ic

Post by sangram »

hi usbbdm,
usbbdm
Junior Member
Posts: 8962
Joined: Mon Jul 18, 2005 9:33 pm

Post by usbbdm »

sangram wrote:hi usbbdm,
i have flash s25fl256 ,
usb jtagnt not read full flash data,
flash read only 8 mb,
but,flash is 32 mb,
how to read full flash data,
0.70 now supports large flash. You need to have proper xml defined.
Use SB6120 as template and make the size to full 32M will allow you read/write 32M flash.
sangram
Junior Member
Posts: 20
Joined: Thu Feb 13, 2014 8:33 pm
Location: i dont know,
Contact:

Post by sangram »

usbbdm wrote:0.70 now supports large flash. You need to have proper xml defined.
Use SB6120 as template and make the size to full 32M will allow you read/write 32M flash.
hi usbbdm,
i select sb6120,data read only 8mb please help
/////////////////////////////////////////////
// SB6120 Script
/////////////////////////////////////////////
1. Backup flash
2. Restore flash
3. Program boot (Like noisy boot)
4. Program firmware (Like shell firmware
5. Exit
Please select
-flshdct 0
Found Address= 00000000 arion8012hd
-flshdct 0
Found Address= 00000000 arion8012hd
-getram 0 800000
Time 00:00:09 (.340)
-flshdct 0
Found Address= 00000000 arion8012hd
-flshdct 0
Found Address= 00000000 arion dto
-getram 0 800000
Time 00:00:09 (.171)
-flshdct 0
Found Address= 00000000 arion dto
-flshdct 0
Found Address= 00000000 arion dto
-getram 0 800000
Time 00:00:09 (.192)
usbbdm
Junior Member
Posts: 8962
Joined: Mon Jul 18, 2005 9:33 pm

Post by usbbdm »

It has been always asked to create xml. Have you even read how the xml looks like?
Take SB6120 for example.

Code: Select all

<Test>
   <Name>SB6120</Name>
   <Cat>Modem</Cat>
   <Protocol>SPIFLASH</Protocol>
   <Endian>Big</Endian>
   <Memorys>
      <Memory>
         <Name>U-Boot</Name>
         <Type>1</Type>
         <Address>0</Address>
         <Size>0x20000</Size>
      </Memory>
      <Memory>
         <Name>env1</Name>
         <Type>1</Type>
         <Address>0x20000</Address>
         <Size>0x10000</Size>
      </Memory>
      <Memory>
         <Name>env2</Name>
         <Type>1</Type>
         <Address>0x30000</Address>
         <Size>0x10000</Size>
      </Memory>
      <Memory>
         <Name>UBFI1</Name>
         <Type>1</Type>
         <Address>0x40000</Address>
         <Size>0x3b0000</Size>
      </Memory>
      <Memory>
         <Name>UBFI2</Name>
         <Type>1</Type>
         <Address>0x3f0000</Address>
         <Size>0x3b0000</Size>
      </Memory>
      <Memory>
         <Name>Blank</Name>
         <Type>1</Type>
         <Address>0x7a0000</Address>
         <Size>0x10000</Size>
      </Memory>
      <Memory>
         <Name>nvram</Name>
         <Type>1</Type>
         <Address>0x7b0000</Address>
         <Size>0x50000</Size>
      </Memory>
   </Memorys>
</Test>
Your XML should look like this.

Code: Select all

<Test>
<Name>Anyname</Name> 
Your filename should be TAnyname. eg. SBV6220 and TSBV6220. Assume your device is a modem. If is is not then Change the <Cat>

Code: Select all

  <Cat>Modem</Cat>
   <Protocol>SPIFLASH</Protocol>
<Endian>Big</Endian>
   <Memorys>
      <Memory>
         <Name>flash</Name>
         <Type>1</Type>
         <Address>0x0</Address>
         <Size>0x1000000</Size>
 </Memory>
   </Memorys>
</Test>
The file is stored in

Code: Select all

%appdata%\Roaming\usbjtag\config
.
To find this address type %appdata% in Run dialog and it will pop Roaming.... Navigate to this folder and save the file.

I hope xml file creation for such target to be an easy task that anyone can do it.
usbbdm
Junior Member
Posts: 8962
Joined: Mon Jul 18, 2005 9:33 pm

Post by usbbdm »

I found a bug in the creation of the xml under tools. I will release a bug fix if people are using this feature.
I use the tool to generate an xml like this.

Code: Select all

<Test>
	<Name>SBV6220</Name>
	<Cat>Modem</Cat>
	<Protocol>SPIFLASH</Protocol>
	<Endian>Big</Endian>
	<IRLength>5</IRLength>
	<Programram>0x0</Programram>
	<Memorys>
			<Memory>
				<Name>flash</Name>
				<Type>1</Type>
				<Address>0x0</Address>
				<Size>0x1000000</Size>
			</Memory>
	</Memorys>
</Test>
sangram
Junior Member
Posts: 20
Joined: Thu Feb 13, 2014 8:33 pm
Location: i dont know,
Contact:

Post by sangram »

hi usbbdm,
usbbdm
Junior Member
Posts: 8962
Joined: Mon Jul 18, 2005 9:33 pm

Post by usbbdm »

sangram wrote:hi usbbdm,
i read s25fl256 flash complete 32 mb with jtag nt,ok
only erase and program problem,
please help,
how to erase and program,
read........ok 32mb
erase......no progress
program....no progress
This flash has different status check command. I need to add this into the code. Maybe next release I can fix this.
Normally 05 is the command to read status when erase, this one needs different command.
usbbdm
Junior Member
Posts: 8962
Joined: Mon Jul 18, 2005 9:33 pm

Post by usbbdm »

After carefully studied the chip, I found it uses the different command sets to address the high block. (4 byte address). I have only one chip that uses 4 bytes address, however the command set is different.
Can you do a command
w 16 r 1

Maybe we can enable the read and write by simply issue a command.

You also need to put
<SPIFlash>1</SPIFlash> in your target XML.
deepakuklana
Junior Member
Posts: 37
Joined: Wed Nov 23, 2011 6:32 pm

hi please help where put

Post by deepakuklana »

hi sir

can you tell where we need to put
You also need to put
<SPIFlash>1</SPIFlash> in your target XML.

<flash>
<id1>0x1</id1>
<id2>0x2</id2>
<id3>0x19</id3>
<name>FL256SAIF00</name>
<size>0x2000000</size>
<protocol>0</protocol>
<block>
<secnum>512</secnum>
<secsize>0x10000</secsize>
</block>
<init>170180</init>
</flash>

please solve the issue erase and programming .reading is ok
deepakuklana
Junior Member
Posts: 37
Joined: Wed Nov 23, 2011 6:32 pm

Post by deepakuklana »

or there we need to put

<Test>
<Name>25FL256</Name>
<Cat>Develop</Cat>
<Protocol>SPIFLASH</Protocol>
<Endian>Big</Endian>
<SPIFlash>1</SPIFlash>
<Memorys>
<Memory>
<Name>flash</Name>
<Type>1</Type>
<Address>0x0</Address>
<Size>0x2000000</Size>
</Memory>
</Memorys>
</Test>
usbbdm
Junior Member
Posts: 8962
Joined: Mon Jul 18, 2005 9:33 pm

Post by usbbdm »

deepakuklana wrote:hi sir

can you tell where we need to put
You also need to put
<SPIFlash>1</SPIFlash> in your target XML.

<flash>
<id1>0x1</id1>
<id2>0x2</id2>
<id3>0x19</id3>
<name>FL256SAIF00</name>
<size>0x2000000</size>
<protocol>0</protocol>
<block>
<secnum>512</secnum>
<secsize>0x10000</secsize>
</block>
<init>170180</init>
</flash>

please solve the issue erase and programming .reading is ok
I assume the latest version read/write this flash.
deepakuklana
Junior Member
Posts: 37
Joined: Wed Nov 23, 2011 6:32 pm

Post by deepakuklana »

no sir

only read , no erase and write.

we can send you one or two flash , if you want work on
usbbdm
Junior Member
Posts: 8962
Joined: Mon Jul 18, 2005 9:33 pm

Post by usbbdm »

<init>170180</init> this is important to allow you erase and program but it is missing in your xml.
deepakuklana
Junior Member
Posts: 37
Joined: Wed Nov 23, 2011 6:32 pm

Post by deepakuklana »

dear sir

this <init>170180</init> already in xml

<flash>
<id1>0x1</id1>
<id2>0x2</id2>
<id3>0x19</id3>
<name>FL256SAIF00</name>
<size>0x2000000</size>
<protocol>0</protocol>
<block>
<secnum>512</secnum>
<secsize>0x10000</secsize>
</block>
<init>170180</init>
</flash>


this is new vesion flash file.
usbbdm
Junior Member
Posts: 8962
Joined: Mon Jul 18, 2005 9:33 pm

Post by usbbdm »

I tried at least I can erase it.
Program had some issue now. I will take a look.
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests