- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
Please tell me about communication between CY7C65211A and MCU.
How is USB (CDC) data converted to SPI and transmitted to the microcomputer?
I want to see the internal state when converting USB commands and SPI signals
I want to know the status of both transmission and reception for Mode 3 (SPI Master Mode) and Mode 4 (SPI Slave Mode).
I want an answer as soon as possible because of important content.
(Today or Tomorrow)
Best regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Yamashita-san,
They can refer to program which is in
C:\Program Files (x86)\Cypress\USB-Serial SDK\examples\usbserialexample
C:\Program Files (x86)\Cypress\USB-Serial SDK\examples\usbserialCDCdeviceExamples
if they want to use SPI as USB-Serial Communications Device Class (CDC) devices, they can refer to usbserialCDCdeviceExamples.
Helpful document is Cypress USB-Serial VCP I2C/SPI API Guide and Read/Write operation API is CySpiReadWrite_VCP(). The arguments are same as CySpiReadWrite() API which can refer to USB Serial API Library Guide.
USB-to-Serial device (CY7C65211A) appropriately converts USB data to SPI format when receiving this command.
USB Serial SDK can install from https://www.cypress.com/documentation/software-and-drivers/usb-serial-software-development-kit
Best regards,
Hirotaka Takayama
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
CY7C65211/11A supports various patterns (Data width, Protocol, etc.) of SPI transfer by setting configuration table.
The customer can install "Cypress USB-Serial Configuration Utility" and plug a device, then configure the table by clikcing "Configure" button.
They can see and change the various settings.
On the above setting, SPI is Master and Protocol is Motorola, CPHA and CPOL is low (Mode 0), etc.
Firmware in the CY7C65211 works accordingly on the settings of this configuration setting.
Unfortunately, firmware implementation cannot share. Please consider that the device works accordingly by setting configuration table using "Cypress USB-Serial Configuration Utility".
Best regards,
Hirotaka Takayama
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your quick response.
Can I share the buffer usage during data transfer?
Data sheet states that a buffer with a data width of 4 to 16 bits and 256 bytes is installed.
Does it mean that the data divided into 4 to 16 bits by SPI communication is stored in a buffer,
and 256 bytes are transferred together via USB?
Best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Buffer is used for buffering data and achieve the good throughput.
- "256 Bytes TX Buffer" stores data from USB transfer to SPI trasnfer whereas "256 Bytes RX Buffer" stores data from SPI transfer to USB transfer. These transaction is done in the CPU main loop as a periodically invoked task.
- USB transfer happens in bursts.
- Since CY7C65211 is a Full-Speed device, bulk packet transfer size is up to 64 Bytes, not 256 Bytes.
Does it make sense?
Best regards,
Hirotaka Takayama
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Takayama-san,
Let me jump in - this customer is not requesting us to share the internal state machine of our USB-to-Serial controller. They are requesting us to give examples of how SPI Rear/Write API gets transformed to an USB packet and SPI operation.
E.g.
1. Host application initiates CySpiReadWrite API to communicate with a SPI pier device
2. CDC driver converts to a certain USB packet (A. Customer wants to take a look this USB packet)
3. USB-to-Serial device converts this read (or write) request to SPI read (or write). (B. Customer wants to take a look at SPI traffic)
It would be really appreciate if you can show both read and write example. Let us know if it is doable.
Thanks in advance.
Yasu Yamashita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Yamashita-san,
They can refer to program which is in
C:\Program Files (x86)\Cypress\USB-Serial SDK\examples\usbserialexample
C:\Program Files (x86)\Cypress\USB-Serial SDK\examples\usbserialCDCdeviceExamples
if they want to use SPI as USB-Serial Communications Device Class (CDC) devices, they can refer to usbserialCDCdeviceExamples.
Helpful document is Cypress USB-Serial VCP I2C/SPI API Guide and Read/Write operation API is CySpiReadWrite_VCP(). The arguments are same as CySpiReadWrite() API which can refer to USB Serial API Library Guide.
USB-to-Serial device (CY7C65211A) appropriately converts USB data to SPI format when receiving this command.
USB Serial SDK can install from https://www.cypress.com/documentation/software-and-drivers/usb-serial-software-development-kit
Best regards,
Hirotaka Takayama