- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Regarding Raid1 code example, what is the buffer that holds data transferred (To/From SD card via DMA Bulk IN/OUT) when CY_FX_MSC_SCSI_WRITE_10 & CY_FX_MSC_SCSI_READ_10 are called by the CBW? I'm looking for the buffer in the CyFxMscApplnParseCbw() function but I couldn't find it.
Any helpful answer is appriciated
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
你好
你寻找的BUFFER在CyFxMscApplnParseCbw()函数中,仔细看看CyU3PSibReadWriteRequest()函数。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
你好
你寻找的BUFFER在CyFxMscApplnParseCbw()函数中,仔细看看CyU3PSibReadWriteRequest()函数。
- 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
I have some more questions in this topic,
If I'm sending text file from host to SD-card, in which buffer I can print the data transferred? Can I make changes to that buffer?
This function CyU3PSibReadWriteRequest() is closed source, regarding data it only contains "numBlks" and "blkAddr" but does not give us the ability to view and change the data.
Any helpful feedback is appriciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
- I assume your SD card came up as a Mass storage device in your PC.
- In that case, when you save a text file in the SD card, then the mass storage driver will write few blocks into the SD card(file system related) before writing the actual data.
- So, in your firmware if you want to modify/print the content of the file, then first you would have to identify which PROD_EVENT in the DMA callback corresponds to actual file data (To do this you will have to analyze what writes are being done before transferring actual data). Only then you can change the data content. If not file-system in your card might get corrupted and you may have to format the card.
Regards,
Hemanth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your response. How do you suggest to analyse the data transactions(read\write) and filter out the file system from the actual data files in the DMA callback function?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The transactions that happen before actual 'Data write' are not related to Cypress firmware. It depends on the Filesystem that you are using on your card. To exactly know them you would have to understand how the file system is managed. Once that is understood, then the initial writes that happen can be analyzed.
Regards,
Hemanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your response,
Does that mean I have to integrate the file system source code into Raid1 project? If yes, what are mainly required to use it in Raid-1 application considering that I want to extract and change file data during read/write processes (without affecting the file name, attribute and location in the memory). I have seen the "cyfx3s_fatfs" example code to understand but I'm confused and I don't know how to start!
Any help will be very much appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You need not put file system source code into the FX3 firmware. You have to put a logic which is capable of filtering the writes which consists of actual user data and not file system related data. Unfortunately, we do not have any example source to share with you.
Regards,
Hemanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
What logic do you suggest to use to filter actual data from other overheads? I tried to use the start address of the actual data in the callback function of Raid-1 project but it didn't work that way.
Any helpful feedback is appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As I mentioned before, it is necessary to find the exact WRITE which corresponds to actual data write from the Host. If we modify any other non-data packets before writing to the card, then it may corrupt the filesystem and you may need to format the card again. So, this does not look like a good solution.
Can you let us know your exact application? Who would be the data source and who would be the consumer? Why are you trying to modify the data in FX3? Can't it be done in the PC itself?
Regards,
Hemanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your feedback,
I was just trying to manipulate data stored into the memory in the USB device.
The data source is a computer text file or any file extension.
i'm aware that it can be done in the PC but I want to modify it in the USB because I wanted to accomplish a study project for university.