Olek's blog

To content | To menu | To search

Tag - USB

Entries feed

Tuesday, January 1 2013

USB CDC class driver for LPC1343

The LPC1343 comes with code bundle from Keil. Among the examples one can find the virtual serial port example, using the USB CDC class. Unfortunately the original .inf file works only for 32-bit systems. To solve the problem, I have grabbed the template file for usbser.sys from the following source CDC class for Atmel MCUs (many thanks to Pavel K). What is interesting, the file was actually based on the driver file for the LPC134x family. For some reason the VID/PID combinations did not work for me (some of them were for Atmel, but some seemed to be still valid for NXP). Nevertheless, the only thing I had to do was to enter the right VID/PID combination. You can download the modified "driver" here: CDC class driver for LPC1343. Now it works well with NGX Technologies mX-LPC1343-S starter kit. In case you use the CooCox to compile the USB CDC example, here goes the useful hint: in case of trouble, change the SystemCoreClock to SystemFrequency (and include system_LPC13xx.h).

Sunday, July 29 2012

WriteFile reports wrong transfer sizes with FT232

There is an interesting issue that may appear when you try to communicate with FT232R virtual serial port using WinAPI. The problem probably persists for other access methods too.

Problem description: - The function WriteFile reports unusually large transfers (e.g. 4104 bytes instead of 1 byte) - It reports 'success', and GetLastError() shows nothing - Actually it sends the amount of data reported, or instead skips sending completely

If you experience the problems mentioned above - ask yourself one simple question. Haven't you connected the FTDI chip to the USB 3.0 port ?

Yes - in my case connecting it to USB 2.0 solved the problem.

(Observed on: Samsung RF711, Windows 7 64-bit, FT232RL)