- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I programmed FX3S FPGA DEV BOARD REV-C by FX3SRAID0 code and some issues happened.
The issues: 1)sometimes when I write a few files to memory, the data of final file are zeros(NULL in ASCII)!
2) sometimes when I write a few files to memory, one of files is written incorrectly(first 4KB are correctly and second 4KB are incorrectly and so on)!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tested the firmware shared by you on FX3S DVK Rev D and I am not able to reproduce th issue when copying the files (exFAT) format. I checked the hxD dump and couldn't see any problems
Please find the attached Wireshark traces, snippets from hxD.
Following was the procedure I follwed
- Connected FX3S DVK to PC (with 2 SD cards 512 MB each inserted - as hot plug is not supported by the firmware )
- Programmed the device with the image file provided by you.
- Formatted the drive with following settings
- Copied TEST.txt files 3-4 times
I opened every file copied and it works fine.
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please confirm if you are using the default RAID0 example from the SDK. If yes, please confirm that the issue is not because of the following reason Data sent from Host over USB is not Committed to G... - Infineon Developer Community Solved: FX3 emmc unreachable after format in manual Part 2 - Infineon Developer Community i.e. please confirm that the amount of bytes written doesn't fall in this criteria
For instance, if OUT transfer needs to be made with X bytes, then: If X > 4 KB, then let Y = (X % 4 KB). Now:
If Y < 4 KB (DMA buffer size in raid 0 example) and (X % 1024) == 0
If this is the case then then on completion of X bytes, a zero-length packet must be sent so that the buffer in the device gets committed to storage port
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please confirm if you are using the default RAID0 example from the SDK. (yes)
please confirm that the issue is not because of the following reason Data sent from Host over USB is not Committed to G... - Infineon Developer Community . (The issues happen with all cases)
Solved: FX3 emmc unreachable after format in manual Part 2 - Infineon Developer Community .(No)
The issues happen with exFAT format, while NTFS format is working good.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please share UART debug prints for the working and non working case. Please confirm that CyU3PSibReadWriteRequest API doesn't fail when the issue is seen
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The UART isn't activated in the default RAID0. You want from me to activate the UART and print status of CyU3PSibReadWriteRequest API. Right?
Regards,
Sulaiman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The UART isn't activated in the default RAID0. You want from me to activate the UART and print status of CyU3PSibReadWriteRequest API. Right?
>> Yes, please share the UART debug prints when the issue is seen
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thank you for the logs.
Please let me know if the issue is seen on multiple storage cards or if this is an issue seen with one card. Also, please confirm if you are using File System APIs (as done in FATfs example of FX3 SDK) or reading/writing in RAW format to the cards
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please let me know if the issue is seen on multiple storage cards or if this is an issue seen with one card.
The issue is seen on multiple storage cards and on multiple boards(DEV board and custom board).
confirm if you are using File System APIs (as done in FATfs example of FX3 SDK) or reading/writing in RAW format to the cards.
I am using File System APIs.
Regards,
Sulaiman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The issue is seen on multiple storage cards and on multiple boards(DEV board and custom board).
>> From this information it can be said that the issue could be from the firmware side.
Please let me know if you can test with the default firmware(in SDK i.e. writing/reading RAW data) and let me know if the issue is seen. This will help us to understand the issue is in which part of the firmware. Or if possible please share the firmware for us to check
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am using the default RAID0 example from the SDK without any change.
You mean by raw data is the data from the PC without processing in FX3s? I think the default RAID0 example is writing/reading raw data.
Please contact with me in email to send you the firmware.
Regards,
Sulaiman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please let me know what is the size of the files that you are copying using the exFAT COPY command
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thank you for the firmware.
I am summarizing the issue here. Please confirm if my understanding is correct.
- The issue (data not proper) happens for exFAT format only. NTFS works fine.
- The issue is seen when "copy" command of exFAT and not with Robocopy
Is my understanding correct?
If yes, please track the CY_FX_MSC_DATASENT_EVENT_FLAG and CY_FX_MSC_CBW_EVENT_FLAG using a global variable and printing the variables in MscAppThread_Entry in the event handling.
Also, capture the USB traces (using Wireshark) when robocopy (working case) and copy (not working case) is done
Please share USB traces, UART debug prints and HxD snippet for the below cases
Case1: Copy test.txt using robocopy command (working case)
Case2: Copy test.txt using copy command (non working case)
Kindly do the above test (test.txt) with the file shared
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, your understanding is correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sulaiman,
From the Wireshark traces for the working and non working case the change that is seen when the test.txt file is sent to FX3S over USB is as folllows:
Working case:
LBA (Logical Block Address) is 0
Non-working case:
LBA: 529 (0x211)
So, as the address is 0x211 as per the raid0 firmware, the data will be written to storage port 1
if (numBlks == 1)
{
/* Only one SD card is to be touched in case of a single block write. */
port = startAddr & 0x01; /* LSB of address only specifies port. */
sibAddr = (startAddr >> 1) * CY_FX_RAID_SECTOR_MULTIPLIER;
sibBlks = CY_FX_RAID_SECTOR_MULTIPLIER;
glRaidOpPending = (1 << port);
status = CyU3PSibReadWriteRequest (CY_FX_SIB_WRITE, port,
glLunUnit, sibBlks, sibAddr, glRaidWriteSocket[port]);
}
Please check the appropriate port and the address location and let me know if the data is written to it
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rashi,
"From the Wireshark traces for the working and non working case the change that is seen when the test.txt file is sent to FX3S over USB is as follows:
Working case: LBA (Logical Block Address) is 0
I think the LBA is 0x210 .
Non-working case: LBA: 529 (0x211)"
I tried to read the data which is written to LBA(0x211) by the following change in CY_FX_MSC_SCSI_READ_10 case but I can't:
if (numBlks == 1)
{
/* Only one SD card is to be touched in case of a single block read. */
if (startAddr==0x210){
port = 0x01;
}
else{
port = startAddr & 0x01;
}
/* LSB of address only specifies port. */
sibAddr = (startAddr >> 1) * CY_FX_RAID_SECTOR_MULTIPLIER;
sibBlks = CY_FX_RAID_SECTOR_MULTIPLIER;
glRaidOpPending = (1 << port);
status = CyU3PSibReadWriteRequest (CY_FX_SIB_READ, port,
glLunUnit, sibBlks, sibAddr, glRaidReadSocket[port]);
}
Is there a way to do it?
Regards,
Sulaiman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Sulaiman,
I tried to read the data which is written to LBA(0x211) by the following change in CY_FX_MSC_SCSI_READ_10 case but I can't:
>> Please share the Wireshark traces for me to evaluate. Also, please check if CyU3PSibReadWriteRequest passed and CY_U3P_SIB_EVENT_XFER_CPLT is received with status as success.
You can also check if CY_U3P_SIB_EVENT_XFER_CPLT received with status as success when write_10 is done on port 1
Also, please confirm if read writes to port 1 are working i.e. the addresses are not write protected
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
When I added the following change, the device didn't work:
if (numBlks == 1)
{
/* Only one SD card is to be touched in case of a single block read. */
if (startAddr==0x210){
port = 0x01;
}
else{
port = startAddr & 0x01;
}
/* LSB of address only specifies port. */
sibAddr = (startAddr >> 1) * CY_FX_RAID_SECTOR_MULTIPLIER;
sibBlks = CY_FX_RAID_SECTOR_MULTIPLIER;
glRaidOpPending = (1 << port);
status = CyU3PSibReadWriteRequest (CY_FX_SIB_READ, port,
glLunUnit, sibBlks, sibAddr, glRaidReadSocket[port]);
}
Regards,
Sulaiman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please help us with the previously requested information to debug this issue :
"Please share the Wireshark traces for me to evaluate. Also, please check if CyU3PSibReadWriteRequest passed and CY_U3P_SIB_EVENT_XFER_CPLT is received with status as success.
You can also check if CY_U3P_SIB_EVENT_XFER_CPLT received with status as success when write_10 is done on port 1
Also, please confirm if read writes to port 1 are working i.e. the addresses are not write protected "
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue is seen on multiple storage cards and on multiple boards(DEV board and custom board).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tested the firmware shared by you on FX3S DVK Rev D and I am not able to reproduce th issue when copying the files (exFAT) format. I checked the hxD dump and couldn't see any problems
Please find the attached Wireshark traces, snippets from hxD.
Following was the procedure I follwed
- Connected FX3S DVK to PC (with 2 SD cards 512 MB each inserted - as hot plug is not supported by the firmware )
- Programmed the device with the image file provided by you.
- Formatted the drive with following settings
- Copied TEST.txt files 3-4 times
I opened every file copied and it works fine.
Rashi