- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I have an additional question about a previously created thread.
CY7C65211A Unintentional frequency change
When connecting the CY7C65211A to an Android device, the SPI communication frequency will be changed
by the CDC Set_Line_Coding sent from the host device.(Android Device)
If a speed different from the SPI clock speed is set by the CDC Set_Line_Coding command from the USB Host, is the data rate that can actually be communicated on the CDC the speed sent by the command?
●For example, if 9600bps is set in Set_Line_Coding, will the data transmitted from the SPI Master side at 1MHz be notified to the USB Host side without omission?
●Is the control order when the speed of SPI is rewritten by the USB CDC command set line coding from the tablet side correct in this recognition?
① Start USB communication
↓
②The USB-SPI conversion IC sends to the tablet that the CDC command SET_LINE_CODING can be received.
↓
③ CDC SET_LINE_CODING is sent from the tablet side
↓
④ The SPI-USB conversion IC receives the above command.
↓
⑤ The SPI communication speed between the SPI-USB conversion IC and the MCU on the device side changes.
Best Regards
Hayato
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Hayato,
Yes the SPI frequency depends on the baud rate selected.
Please see the below test.
I have set the baud rate to 115200 in Teraterm, while the SPI frequency set from the USB-Serial configuration utility is 2MHz.
When I transfer "cypress" from the tera term windows, the data is transmitted at around the same frequency set in the tera term baud setting.
Thanks,
Yatheesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Hayato,
Yes the SPI frequency depends on the baud rate selected.
Please see the below test.
I have set the baud rate to 115200 in Teraterm, while the SPI frequency set from the USB-Serial configuration utility is 2MHz.
When I transfer "cypress" from the tera term windows, the data is transmitted at around the same frequency set in the tera term baud setting.
Thanks,
Yatheesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Yatheesh
Thank you for your response.
I understand that the frequency will change.
●Is the order of the process of changing the frequency correct as I wrote above?
Is there a way to notify the host if it has not been notified?
●In other words, what kind of method is there to make the data rate that can actually communicate on the CDC the clock speed of the SDK when a speed different from the SDK is set by the CDC Set_Line_Coding command from the USB Host?
Best Regards
Hayato
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Hayato,
Yes, your understanding is correct.
what kind of method is there to make the data rate that can actually communicate on the CDC the clock speed of the SDK when a speed different from the SDK is set by the CDC Set_Line_Coding command from the USB Host?
-> Only way is to get back the SPI config using the CyGetSpiConfig_VCP API from the VCP library and retrieve the SPI frequency set and compare it with the previously set baud rate.
There is no way to notify the host from the device.
Thanks,
Yatheesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Yatheesh
Sorry for asking so many questions.
About changing the frequency by a command from the host (connected Android device).
Assuming a product, it is the speed of the USB CDC part between the tablet and the USB-SPI conversion IC that changes the frequency.
(The speed between the microcomputer and the conversion IC does not change)
●Is this perception correct?
Also, regarding ② of the above question.
“The USB-SPI conversion IC sends to the tablet that the CDC command SET_LINE_CODING can be received.”
●Is it possible to change the USB-SPI conversion IC to the tablet side without sending that the CDC command SET_LINE_CODING can be received?
Best Regards
Hayato
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Assuming a product, it is the speed of the USB CDC part between the tablet and the USB-SPI conversion IC that changes the frequency.
(The speed between the microcomputer and the conversion IC does not change)
>>
Assuming your setup is as shown above. the SPI speed between "USB-SPI converter" and "Controller supporting SPI" will change. USB side remains unaffected.
●Is it possible to change the USB-SPI conversion IC to the tablet side without sending that the CDC command SET_LINE_CODING can be received?
>> Tablet can directly send SET_LINE_CODING CDC command to the USB-SPI converter. Therefore point 2 is not applicable. In case you want to know the currently set frequency you can get it using CyGetSpiConfig_VCP. This is not a mandatory step.
Pranava