Author Topic: Need Help To Reprogram Cypress MCU  (Read 12152 times)

0 Members and 1 Guest are viewing this topic.

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11700
  • Country: my
  • reassessing directives...
Need Help To Reprogram Cypress MCU
« on: November 29, 2011, 04:28:16 pm »
hi i have this Altera USB Blaster that uses Cypress CY7C68013A as controller, since i'm not currently into programming FPGA, i think i wanna upload the original program in case it is lost in the chip, and or reprogram the chip for different purpose. and then upload again the original FW to become Altera USB Blaster again.

from the net adviced me to download the Cypress Console to do the reprogramming. but i dont see the download button, ie to save the program from the chip into my PC, does anyone know how to download the program?
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline tinhead

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Need Help To Reprogram Cypress MCU
« Reply #1 on: November 29, 2011, 05:39:20 pm »
by "default" the firmware for FX2 would be on your PC, however here it can be also (in case you haven't installed anything)
in the E2PROM. You should consider using any kind of I2C reader instead of Cypress Console - the download button is
as you robably already recognized there (older console version) but download means PC -> µC(EEPROM).

Btw, funny design, so it seems chinese guys finally managed to save another one dollar, the clone i'm using is
based on FTDI and Altera CPLD, just FX2 (and level shifter) is definitely cheaper.

And yes, in principle there are some tools to read back, but honestly the risk of making a worng backup
(especialy under windows it sucks, for linux there are some better ways) is not worth. I personaly
prefer the hard way, desolder, read back, program in empty, check for function.
The soft way, if you screw up and read back crap will anyway need to solder empty E2PROM to check
the content (or play russian roulette and re-program org. chip ...)

« Last Edit: November 29, 2011, 05:47:06 pm by tinhead »
I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11700
  • Country: my
  • reassessing directives...
Re: Need Help To Reprogram Cypress MCU
« Reply #2 on: November 29, 2011, 05:55:19 pm »
And yes, in principle there are some tools to read back, but honestly the risk of making a worng backup
(especialy under windows it sucks, for linux there are some better ways) is not worth. I personaly
prefer the hard way, desolder, read back, program in empty, check for function.
The soft way, if you screw up and read back crap will anyway need to solder empty E2PROM to check
the content (or play russian roulette and re-program org. chip ...)
yes i can desolder, but any schematic how to connect? do i need extra programmer/tool to read direct from chip pin? sorry i'm newbie, what do you mean by resoldering back empty E2PROM and check the content?
« Last Edit: November 29, 2011, 05:57:26 pm by Mechatrommer »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline deephaven

  • Frequent Contributor
  • **
  • Posts: 796
  • Country: gb
  • Civilization is just one big bootstrap
    • Deephaven Ltd
Re: Need Help To Reprogram Cypress MCU
« Reply #3 on: November 29, 2011, 06:26:11 pm »
Don't do it! Keep the USB Blaster as that and make/get another board for programming with something else. Much less risky!
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11700
  • Country: my
  • reassessing directives...
Re: Need Help To Reprogram Cypress MCU
« Reply #4 on: November 29, 2011, 11:20:06 pm »
Don't do it! .... Much less risky!
can you elaborate? i did press bulk transfer and file transfer: 0:endpoint1 IN, but messaged as failed. according to help file, its to download to PC. did i broke something?
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline deephaven

  • Frequent Contributor
  • **
  • Posts: 796
  • Country: gb
  • Civilization is just one big bootstrap
    • Deephaven Ltd
Re: Need Help To Reprogram Cypress MCU
« Reply #5 on: November 30, 2011, 08:59:40 am »
Don't do it! .... Much less risky!
can you elaborate? i did press bulk transfer and file transfer: 0:endpoint1 IN, but messaged as failed. according to help file, its to download to PC. did i broke something?

What I meant was rather than risk breaking the very useful USB Blaster, wouldn't it be better to get/make another board to experiment with?
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11700
  • Country: my
  • reassessing directives...
Re: Need Help To Reprogram Cypress MCU
« Reply #6 on: November 30, 2011, 10:02:02 am »
ok thanks, i thought there is easy way.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Online kripton2035

  • Super Contributor
  • ***
  • Posts: 2636
  • Country: fr
    • kripton2035 schematics repository
Re: Need Help To Reprogram Cypress MCU
« Reply #7 on: November 30, 2011, 10:14:54 am »
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11700
  • Country: my
  • reassessing directives...
Re: Need Help To Reprogram Cypress MCU
« Reply #8 on: November 30, 2011, 11:13:48 am »
they are quite cheap today ...
yes i know that thanks. the problem is upload/download software. even if i buy many of it, the question is still the same. i could have many "broken" of it if i dont know how to. these chinese sellers sometime are less helpful. you ask them how to, they will reply, you search the internet "lor"! but i can see in the link its ezusb fx2lp, maybe i'll go and download the software from cypress. thanks.
edit: err, infact thats what i've been downloading, maybe i should look more into help files and example.
« Last Edit: November 30, 2011, 11:28:45 am by Mechatrommer »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline tinhead

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Need Help To Reprogram Cypress MCU
« Reply #9 on: May 20, 2012, 11:26:05 pm »
finally i got that cable too, dumped the firmware and recognized the original sources of it

http://fpga4u.epfl.ch/wiki/FX2

This cheap cable is using it's using EPFL fw 4.2, with an extra "copyright armjishu.com" string
which of course is a bullshit.

I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11700
  • Country: my
  • reassessing directives...
Re: Need Help To Reprogram Cypress MCU
« Reply #10 on: May 20, 2012, 11:36:58 pm »
your providing the wiki, not the cheapo cable you got from. anyway, i managed to program my blaster to become 3-1, the program is actually in i2c eeprom, now it has inside 3 eeproms stacked on top one another and using switch to change the purpose :P
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8519
  • Country: us
    • SiliconValleyGarage
Re: Need Help To Reprogram Cypress MCU
« Reply #11 on: May 21, 2012, 12:02:05 am »
The 68013 in those designs does not contain ANY firmware ! Firmware is loaded from the PC side . So there is no point in trying to 'read' what is there.
The external eeprom only holds a vid/pid pair and some USB strings to notify the driver on the computer what this thing does. It is then the drivers task to load the firmware in the cypress chip. The cypress chip runs from RAM.

There is a mechanism to store code in an eeprom but you need a 24c128 device minimum to do this. And the bootpins are set differently.

Let me guess : you are trying to use selectable external eeproms so you can 'switch' between 'byeblaster' , 'xilinx' , 'salae' , 'usbee' and a few others right ?
That is just despicable. If you want a salae just buy one. If you want a usbee : buy one. The byteblaster can be gotten officially from Terasic ( they designed it for altera ) for 50$

They are not that expensive. I personally know the two guys that run Salae (they had an open-house day a couple of months ago in candlestick park so i went by for pizza). They put a lot of effort in the code. The hardware costs peanuts but is wel engineered and sits in a nice solid aluminum machined housing and not a crappy flimsy plastic box.
The Salae's are very well made.

They showed a whole bag with chinese 'clones'. There's at least 40 different ones out there... All penny pinched 'designs'. the Salae has additional protection circuitry on the pins that none of the wing-wang-wongs have. We all need to live. If everyone rips off the people that are trying to make an honest buck by 'stealing' .. it'll all go to snot.

THe USBee actually can detect fakes... the chinese clones use a slightly different eeprom than the original one. If the usbee software detects this eeprom ( they read the id code of the eeprom) it erases the eeprom.

The guys at salae explained how it is done. They can detect it too, but have chosen not to react to it.
So of course we asked them : why not ? . Answer : We think there is enough people out there that are willing to pay for something they like to keep us in business.

I kind of like that attitude.

The real Altera byteblaster does use a FTDI chip and a little CPLD. it also use Maxim real level shifters that none of the wing-pang-fong's have.
The same crap is going on with AVR and PIC programmers. There's many cheapo programmers out there based on the ASP in camouflage... but put the real programmer next to it and you will see biiiig differences. Lots more protection circuitry , real level shifters and an overall better build quality.

just get the real deal. it ain't that expensive, especially not for something you will get a lot of usefull years from and have a lot of fun with.
« Last Edit: May 21, 2012, 12:07:26 am by free_electron »
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11700
  • Country: my
  • reassessing directives...
Re: Need Help To Reprogram Cypress MCU
« Reply #12 on: May 21, 2012, 12:13:56 am »
oppps! i shouldnt have made the post.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline tinhead

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Need Help To Reprogram Cypress MCU
« Reply #13 on: May 21, 2012, 12:27:39 am »
The 68013 in those designs does not contain ANY firmware ! Firmware is loaded from the PC side . So there is no point in trying to 'read' what is there.

the actuall cheap programmer does not need firmware on PC side, fw is already stored in EEPROM and NOT selectable.
So it is only Altera Blaster clone, nothing less and nothing more.

It does use the EPFL firmware (that the wiki link i posted before), however sources are a littbe bit modified (pinout).
I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8326
Re: Need Help To Reprogram Cypress MCU
« Reply #14 on: May 21, 2012, 07:33:42 am »
The 68013 in those designs does not contain ANY firmware ! Firmware is loaded from the PC side . So there is no point in trying to 'read' what is there.

the actuall cheap programmer does not need firmware on PC side, fw is already stored in EEPROM and NOT selectable.
So it is only Altera Blaster clone, nothing less and nothing more.

It does use the EPFL firmware (that the wiki link i posted before), however sources are a littbe bit modified (pinout).
You're correct, it's specified in the datasheet on page 4:
Quote
During the power up sequence, internal logic checks the I2C port for the connection of an EEPROM whose first byte is either 0xC0 or 0xC2. If found, it uses the VID/PID/DID values in the EEPROM in place of the internally stored values (0xC0), or it boot-loads the EEPROM contents into internal RAM (0xC2). If no EEPROM is detected, FX2LP enumerates using internally stored descriptors. The default ID values for FX2LP are VID/PID/DID (0x04B4,0x8613, 0xAxxx where xxx = Chip revision).
The firmware from EEPROM method is probably less common than USB boot because it is not as flexible and requires a much larger EEPROM.
 

Offline tinhead

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Need Help To Reprogram Cypress MCU
« Reply #15 on: May 21, 2012, 10:09:16 am »
You're correct, it's specified in the datasheet on page 4:

what datasheet are you talking about?
I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 

Offline tinhead

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Need Help To Reprogram Cypress MCU
« Reply #16 on: May 22, 2012, 02:29:49 pm »
in case someone need Altera Blaster and don't wish to buy/wait to get one from e.g. ebay
see attached schematic and firmware.

Yes, it is dump from a chinese programmer, but honestly i don't give a shit about them.
They do not respect GPL so i'm posting their changed (binary) code.

The whole thing is very simple, based on Cypress FX2LP chip.

EDIT: i've compiled my own firmware. It based on http://fpga4u.epfl.ch/wiki/FX2 sources but configured/matching
hardware from my schematics.

There is however one difference to the chinese (dumped) version posted before, i did it properly:
- no ghost endpoints (chinese version is having 4 endpoints, 2 are for Altera Blaster but two are not used,
  they remains from the EPFL firmware but they don't need to be there for Altera Blaster functionality)
  Due this change your OS will see now one instead of two Altera Blasters (as with chinese version)

- no unecessary code inside.

EDIT: you have to use SDCC 2.9 to be able to compile my code.
« Last Edit: May 28, 2012, 01:39:20 pm by tinhead »
I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 
The following users thanked this post: Mechatrommer, radiolistener

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8326
Re: Need Help To Reprogram Cypress MCU
« Reply #17 on: May 23, 2012, 06:15:22 am »
 

Offline tinhead

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Need Help To Reprogram Cypress MCU
« Reply #18 on: May 23, 2012, 07:52:11 am »
You're correct, it's specified in the datasheet on page 4:

what datasheet are you talking about?
http://www1.futureelectronics.com/doc/CYPRESS/CY7C68013A-56PVXCT.pdf

you probably misunderstood something, i was talking about what kind of firmware is beeing used by this programmen and
not how this works, but nevermind.

I did created own firmware in the meantime, see above.
I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf