Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
741 Views

how to Program the flash tc58fvt160

Hi: 

now I want to use the flash tc58fvt160 of up3 on the ecos system, on the datasheet of the component I find the command of the "Block erase, Auto chip Erase and the auto program , fast program" , but I did not find the command about the buffer program, so I think if the flash can be auto programed from the sector to the buffer without any command , if not who can tell me how to program the flash tc58fvt160? 

thks
0 Kudos
3 Replies
Highlighted
Valued Contributor III

Re: how to Program the flash tc58fvt160

aihuazou, 

 

I read your question as how do I write a driver for my flash chip. I'm afraid there is no real shortcut, you need to start with an existing driver and modify it to work with your flash part, as monkeyboy has already explained with this post. 

 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

Unfortunately you cannot use the Altera CFI flash driver with eCos since eCos is based on the eCos HAL, rather than the Altera HAL - so you will need to provide an eCos specific driver for your flash part. 

 

My guess would be that flash_tc58xxx.inl is a good starting point, although I haven&#39;t personally used these flash parts/your board - so I can&#39;t be certain. 

 

As far as I&#39;m aware, there&#39;s no documentation on how to write flash drivers for eCos. The best way at this is to follow the existing examples, and read the comments in the apropriate source code. In your case moab_nand_flash.c may serve as a useful example. 

 

An explanation of the macros you will need to define (such as CYGNUM_FLASH_INTERLEAVE) can be found in flash_tx58xxx_parts.inl. 

 

In addition, the flash driver provided for the flash on the Nios II development board may help explain how to access Nios II specific information (such as the base address of the flash part). 

 

Good luck![/b] 

--- Quote End ---  

0 Kudos
Highlighted
Valued Contributor III

Re: how to Program the flash tc58fvt160

hi: 

Yeah , I have written the "qury ID " and "erase chip" drivers for the flash , when I tried to write the "program chip" drivers ,I found there was only the command code for the "auto program(0xa0) and fast program(0xa0)" and no command code for the buffer program in the datasheet of the TC58FVB160 , so I think if the chip&#39;s programming course is only to program the sector and not to program the buffer ,as the chip am29lv160 (whose program include two course: one is program the sector and other is program the buffer) , in other words, the chip auto program buffer without any additional command code after program the sectors. if it is wrong ,then who can tell me what is the buffer program command code?
0 Kudos
Highlighted
Valued Contributor III

Re: how to Program the flash tc58fvt160

aihuazou, 

 

If I may paraphrase your question is "How do I program a Toshiba flash". I would suggest asking Toshiba, as you seem to be getting confused. 

 

You state that for the AMD 29LV160 "(whose program include two course: one is program the sector and other is program the buffer)". Looking at table 9 of the AMD spec the device only features program, there is no buffered program method. I don&#39;t have the datasheet for the Toshiba chip and so can&#39;t comment on that chip. 

 

Now there are some flash chips with two programing methods, one where you write a programming sequence before every address data pair, and others (sometimes called buffered mode) where you write a sequence followed by addr data, addr data etc. end sequence. This does not appear to be one. 

 

However which method you use is normally just up to the driver writer, one is obviously more efficient.
0 Kudos