You are here

Firmware to read/write SDHC SD cards using FX3S | Cypress Semiconductor

Firmware to read/write SDHC SD cards using FX3S

Summary: 4 Replies, Latest post by aditha_1975281 on 18 Jan 2017 01:43 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
VincentTH2_1818301's picture
User
4 posts

We have a board where the Cypress FX3S drives 2x SDHC SD Cards,  We are currently using FX3SMassStorage.img as the firmware, but it appears that it only access 1/2 the storage capacity (fdisk lists the capacity of a 2GB SDHC card as 2Mx512byte disk.

I know that the Pactron Dev Kit can read SDCard successfully.  Can I have a pointer as to what firmware is loaded into the FX3S on the dev board?

 

Thanks In Advance

Kernel: 3.14.5

fdisk -l output:

Disk /dev/sde: 1001 MB, 1001357312 bytes
31 heads, 62 sectors/track, 1017 cylinders, total 1955776 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x45b26c0c

Disk /dev/sdd: 1001 MB, 1001390080 bytes
31 heads, 62 sectors/track, 1017 cylinders, total 1955840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x20202020

mady's picture
Cypress Employee
1022 posts

The firmware loaded on Pactron Board is avaiable in FX3 SDK: "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\msc_examples\cyfx3s_msc"

Regards,

- Madhu Sudhan

VincentTH2_1818301's picture
User
4 posts

Thanks,

I recompiled cyfx3s_msc and removed the codes that define 2 LUNs for each port (My guess is that codes cause the halving of the CD Card capacity), recompiled the firmware.

 

Now, I can't download the new firmware to the Dev board.  Ubuntu 14.04 identify the device as 04b4, idProduct=4721, which is not what the Bootloader should be identified (VID=04b4, PID=00F3).

 

How do I set the jumper on the dev board in order to flash the new firmware to SPI?

 

303.963415] usb 2-3: new SuperSpeed USB device number 2 using xhci_hcd
[  303.980922] usb 2-3: LPM exit latency is zeroed, disabling LPM.
[  303.982828] usb 2-3: New USB device found, idVendor=04b4, idProduct=4721
[  303.982831] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  303.982833] usb 2-3: Product: SD3 
[  303.982834] usb 2-3: Manufacturer: Cypress
[  303.982836] usb 2-3: SerialNumber: 012345678901
[  304.001179] usb-storage 2-3:1.0: USB Mass Storage device detected
[  304.001237] scsi host4: usb-storage 2-3:1.0
[  304.001307] usbcore: registered new interface driver usb-storage
[  304.004546] usbcore: registered new interface driver uas
[  305.002051] scsi 4:0:0:0: Direct-Access     Cypress  SD3 MSC DEMO     0001 PQ: 0 ANSI: 0
[  305.002452] scsi 4:0:0:1: Direct-Access     Cypress  SD3 MSC DEMO     0001 PQ: 0 ANSI: 0
[  305.003021] sd 4:0:0:0: Attached scsi generic sg1 type 0
[  305.003240] sd 4:0:0:0: [sdb] 1920000 512-byte logical blocks: (983 MB/937 MiB)
[  305.003253] sd 4:0:0:1: Attached scsi generic sg2 type 0
[  305.004611] sd 4:0:0:0: [sdb] Write Protect is off
[  305.004615] sd 4:0:0:0: [sdb] Mode Sense: 03 00 00 00
[  305.006068] sd 4:0:0:0: [sdb] No Caching mode page found

 

Thanks for the help.

VincentTH2_1818301's picture
User
4 posts

OK, I found the answer to my own question: PMOD set to Z11 to boot to RAM (USB), but the download to SPI failed with error message :

sudo !!
sudo ./cyusb_linux &
[2] 4175
[1]   Done                    ./cyusb_linux
zii@zii-Latitude-E5570:~/Cypress/cyusb_linux_1.0.4/bin$ Signal 10 (=SIGUSR1) received !
No device of interest found
Signal 10 (=SIGUSR1) received !
No of devices of interest found = 1
Current device is not the FX3 flash programmer
Failed to find FX3 flash programmer
Trying to download flash programmer to RAM
Failed to find cyfxflashprog.img file
FX3 flash programmer not found
Signal 10 (=SIGUSR1) received !
No device of interest found
Signal 10 (=SIGUSR1) received !
No of devices of interest found = 1
Found FX3 flash programmer
Erased sector 0 of SPI flash
Erased sector 1 of SPI flash
Erased sector 2 of SPI flash
Write to SPI flash failed

 

 

Is there any document to download the firmware, specifically written for Linux and the Pactron FX3S FPGA Dev Board Rev C?  (I read the Windows version for FX3 board but I could not find 1/2 of the switches that the Windows document mentions.

 

aditha_1975281's picture
User
1 post

set CYUSB_ROOT environment variable to your cyusb_linux tool installation path.

export CYUSB_ROOT=~/Cypress/cyusb_linux_1.0.4/

Log in to post new comments.