cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual Com Port

mvi
Associate II
Posted on November 27, 2008 at 11:13

Virtual Com Port

12 REPLIES 12
mvi
Associate II
Posted on May 17, 2011 at 12:34

Hello!

Here is my source files for the Virtual Com Port. I have attached the changed C files. Make sure the Set_System function in the hw_config.c file is filled.

Many thanks to lanchon and everyone for the support i got.

With this update you can transfer more than a single byte bidirectionally on the USB.

Cheers.

-Mad D

PS: I have modified the Virtual COM Port example from ST. Please use it freely.

[ This message was edited by: mvi on 30-04-2008 14:14 ]

16-32micros
Associate III
Posted on May 17, 2011 at 12:34

Hi Mad D

Thanks for you contribution ! I appreciate it 🙂 Hope you have finalized your end application with STM32 and going to production soon 🙂

Cheers,

STOne-32.

wmaguire
Associate II
Posted on May 17, 2011 at 12:34

Hi Mad D

I tried to use your zip files on the STM32F101xB development board and IAR compiler with little success. The zip file appears to contain C files only. I would be grateful, if possible if you would post the entire project along with header files as I suspect I have missed something in re-creating the project.

Regards

Walt

wmaguire
Associate II
Posted on May 17, 2011 at 12:34

Hi all

I modified the STM application to cater for circular buffers for the tx and rx. The complete IAR project file is attached. Basically almost there for full bridge but does something very strange. If you use HyperTerminal you will see that when sending a character such as ''g'' for example, it sends it, press ''g'' again and it sends and extended ASCII character, then press ''g'' again, sends g. It is not in the USART handlers as the data from the USB is faulty, as checked on an Emulator. It appears to be adding a parity bit (note no parity is set in both the Hyperterminal settings) as the only difference between the error charcter and good character is the MSB. Now the very strange effect. If you send a text file from the other Hyperterminal (ie the one not connected to the USB virtual port, ie RS232 side USART1), it works 100% after that. You can send an receive large text files with no errors. You can type all the ''g''s you want an no errors

I would be grateful if anyone out there has had a similar issue and could advise me of how to fix it.

Regards

Walt

🙂

wmaguire
Associate II
Posted on May 17, 2011 at 12:34

Actually, the bug I described in my last post exists in the code from ST. Try type g several times with the baud rate set to 9600.

trevor1
Associate II
Posted on May 17, 2011 at 12:34

Hi Walt,

Are you using the latest CDC example code from ST? I noticed one of the changes ST made when they last updated the CDC example was to do with UART parity setting.

I'm using CDC in a virtual com port scenario and therefore I've removed all the ST code to do with changing UART settings so this doesn't affect me but I did notice a change in this area when I ''winmerged'' the old and the new example code.

Regards

Trevor

jj
Associate II
Posted on May 17, 2011 at 12:34

Just so others know - some versions of hyper-terminal behave strangely when you send ''repeated'' keystrokes. Most always 4 repeated keystrokes will generate illegal outputs - seem to recall that certain repeat of as few as 3 keystrokes may also cause similar.

Suggest that a 2nd STM32 be programmed/employed as your serial buffer/test device. My firm has designed such a device and will be posting here after all tests pass... Will be low-cost, battery powered & include 8 line, mini Lcd to display send/receive data...

wmaguire
Associate II
Posted on May 17, 2011 at 12:34

Hi all

Once again many thanks to all who posted replies. The problem was indeed Hyperterminal and once this was identified I was able to debug my code. The complete IAR STM32F10xB eval project is attached. Note it does not do flow control as of yet but when I get around to it I will post it. Sorry to ST for suspecting their drivers.

Regards

Walt

wmaguire
Associate II
Posted on May 17, 2011 at 12:34

Hi there

There appears to be an issue with HyperTerminal and not the Virtual Com Port example. Not 100% certain at the moment but will keep you posted. Also please do not use the code I posted as it has several of my own bugs which I will fix and then I will post the entire working project.

Many thanks to all who have posted replies.

Regards

Walt :D