- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to detect a baud rate change on PC change on a on a USBFS CDC device? Driver issue? Bug?
USBFS config attached
Solved! Go to Solution.
- Labels:
-
PSOC5 LP MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @AnSa_1225656 ,
The USBUART does not have any transfer rate limitation, but theoretically the transfer rate is limited by the USB Full Speed (12 Mbit/s) in case of PSoC devices.
I have attached the USBFS_UART PSoC 5LP code example. Can you please try it at your end to check if this is working fine for you? You can follow up the code example document to understand the working.
I will explain below the steps which I followed in order to detect the change in the baud rate -
1. I tried to run the program in the debug mode. Meanwhile, I checked that whatever I type on the serial terminal, it is getting printed. This is how the code example should work.
2. Now I added a breakpoint at the line 143 in main.c file in order to check that when I change the baud rate through the serial terminal, does it set the USBUART_LINE_CODING_CHANGED macro. I then tried changing the baud rate to 115200 and executed "step over" until I reach LCD_Position(0,0) API.
3. I could see that the value of changed baudrate(115200 here) is getting stored in the string "lineStr" using the USBUART_GetDTERate() API. In the debug mode, if we hover over this variable lineStr, we can see the baudrate as 115200 there. by expanding it's value.
Hence, USBUART_IslineChanged() and USBUART_GetDTERate() APIs works at my end. Can you please follow the above steps and let us know if it this helps or in case of any query?
Best Regards,
Aashita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @AnSa_1225656
Could you please attach your complete project? This will help us to recreate the issue at our end.
Also, Kindly let us know how are you changing the baud rate from the PC?
I guess you have created a similar thread in the community: https://community.cypress.com/t5/PSoC-5-3-1-MCU/USBFS-USB-GetDTERate-not-changing/td-p/283508
We will be continuing the discussion over the same thread as well.
Thanks and Regards
Ekta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ekta, I can send the code directly to you (Cypress/Infineon), but because of client I can not post the code in a more public venue. Do you have an email that I can send it to? Basically, I just need a USBFS CDC port example that can detect baud changes.
To change the baud on the PC side, I am changing the baud in the terminal emulator. I have tried with XBee3 XCTU application as well as TeraTerm, and PuTTY. The XBee3 module that is on the UART side needs the baud change when it goes to bootloader mode.
- 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
Still looking for some help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @AnSa_1225656 ,
The USBUART does not have any transfer rate limitation, but theoretically the transfer rate is limited by the USB Full Speed (12 Mbit/s) in case of PSoC devices.
I have attached the USBFS_UART PSoC 5LP code example. Can you please try it at your end to check if this is working fine for you? You can follow up the code example document to understand the working.
I will explain below the steps which I followed in order to detect the change in the baud rate -
1. I tried to run the program in the debug mode. Meanwhile, I checked that whatever I type on the serial terminal, it is getting printed. This is how the code example should work.
2. Now I added a breakpoint at the line 143 in main.c file in order to check that when I change the baud rate through the serial terminal, does it set the USBUART_LINE_CODING_CHANGED macro. I then tried changing the baud rate to 115200 and executed "step over" until I reach LCD_Position(0,0) API.
3. I could see that the value of changed baudrate(115200 here) is getting stored in the string "lineStr" using the USBUART_GetDTERate() API. In the debug mode, if we hover over this variable lineStr, we can see the baudrate as 115200 there. by expanding it's value.
Hence, USBUART_IslineChanged() and USBUART_GetDTERate() APIs works at my end. Can you please follow the above steps and let us know if it this helps or in case of any query?
Best Regards,
Aashita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content