AnsweredAssumed Answered

stm32f4 Virtual Comm not talking to custom app

Question asked by o_tech on Sep 7, 2017
Latest reply on Sep 8, 2017 by o_tech

I am working with the STM32f4 Virtual Comm (code generated by the stmCube). I was able to communicate with my custom app written in c# with visual studio 2012; however, recently it stops communicating with the App. it throws an exception "This parameter is incorrect". i don't believe my firmware is wrong because i can communicate just fine with Tera Term also, I don't believe my c# code is incorrect because I can open other comm port with it.

 

is there a bug in visual studio serial port? 

 

this is my c# serial init code:

 

serial_port.PortName = port;//this is "COM3"
serial_port.DataBits = 8;
serial_port.Parity = Parity.None;
serial_port.StopBits = StopBits.One;
serial_port.BaudRate = 112500;
serial_port.Handshake = Handshake.None;

// Set the read/write timeouts
serial_port.ReadTimeout = 1000;
serial_port.WriteTimeout = 1000;
serial_port.ReadBufferSize = 1024;
serial_port.WriteBufferSize = 1024;

Outcomes