This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CDC parameter change

hello

i am working on a project that involves a use of a CDC interface (virtual com port).

now the serial baudrate is fixed at 9600 baud.

is there any manner to change this rate using this function :

bool USBD_CDC0_ACM_SetLineCoding (CDC_LINE_CODING *line_coding) { // Add code for set line coding

return true;
}

thanks

Parents
  • You are mixing things up here.

    Your CDC device can change the communication settings only when USB Host sends a command SetLineCoding to it and you do that in the USBD_CDC0_ACM_SetLineCoding callback.

    So, for example, you change baud rate in your USB Host software (for example terminal on Windows PC) then it sends a command SetLineCoding to the USB Device.
    Software on USB Device calls USBD_CDC0_ACM_SetLineCoding in which you can handle the request to change baud rate.

Reply
  • You are mixing things up here.

    Your CDC device can change the communication settings only when USB Host sends a command SetLineCoding to it and you do that in the USBD_CDC0_ACM_SetLineCoding callback.

    So, for example, you change baud rate in your USB Host software (for example terminal on Windows PC) then it sends a command SetLineCoding to the USB Device.
    Software on USB Device calls USBD_CDC0_ACM_SetLineCoding in which you can handle the request to change baud rate.

Children
No data