Skip to main content
anthony239955_stm1
Associate
November 13, 2006
Question

USB demos for Raisonance/GNUARM

  • November 13, 2006
  • 22 replies
  • 4597 views
Posted on November 13, 2006 at 05:34

USB demos for Raisonance/GNUARM

This topic has been closed for replies.

22 replies

sjo
Associate III
March 13, 2006
Posted on March 13, 2006 at 05:31

Hi,

1. The sys/types is part of the newlib include files. it is used to in the function _sbrk_r (malloc). It is not required for ADS as this has its own heap allocation function.

2. ADS has its own retarget function, just use those to replace the newlib retarget fucntions.

3. See above, not required - only for newlib

4. usbser.sys is the only driver required for 2000/XP, the others are for systems that do not have a virtual com driver, eg. win98.

Regards

sjo

redapple_1982
Associate II
March 15, 2006
Posted on March 15, 2006 at 03:23

Thanks sjo!

I've replaced the function _write_r() with fputc() to retarget, and the function _read_r() with fgetc().But still I couldn't make my USBcdc work.When the USB device enumeration was completed, I installed the driver usbser.sys, so I could see a new serial port 'COM3' on my PC, but if I tried to open it, I was always told that there was something wrong with COM3 or it was being used by another application.

So I used USB Analyser to see what really happened in detail:

1.the PC sent 'GET_LINE_CODING' and my USB device replied well;

2.the PC sent 'SET_LINE_CODING' and device replied with zero packet;

3.the PC sent 'SET_CONTROL_LINE_STATE' and device replied with zero packet.

The first three steps all happened on EndPoint0. Then the PC started to send IN packets on EndPoint1(the interrupt type) and the USB device always replied 'NAK' because EP1_Callback did nothing.

I don't know whether this demo is completed one.Could you help me?

Thank a lot!

Regards

Dan

sjo
Associate III
March 16, 2006
Posted on March 16, 2006 at 06:22

Here is the usb data from my machine.

Regards

sjo

________________

Attachments :

cdclog.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtT4&d=%2Fa%2F0X0000000aQO%2FSdR.3TNjzMGtGjLFnIAzLM6GVQveQ038zaH2eCjn40s&asPdf=false
redapple_1982
Associate II
March 17, 2006
Posted on March 17, 2006 at 06:09

Thanks sjo!

Could you give me the source code of USBcdc driver on PC? :)

sjo
Associate III
March 17, 2006
Posted on March 17, 2006 at 06:12

You will have to speak to Bill Gates for that one.

sjo

alexk2
Visitor II
March 20, 2006
Posted on March 20, 2006 at 06:10

Hi,

2 sjo: regarding driver - is it need to define communication speed for the virtual com?

Thanks, Axel

sjo
Associate III
March 20, 2006
Posted on March 20, 2006 at 07:07

The comms speed is not relevant, as the device will work at the usb bus speed.

Regards

sjo

sjo
Associate III
May 5, 2006
Posted on May 05, 2006 at 10:10

if still interested could moderator RISC contact me sjo_at_anglia_dot_com for other demos he was after.

Cheers

sjo

erics
Associate II
August 10, 2006
Posted on August 10, 2006 at 14:10

Hello,

Has anyone successfully ported this code into Keil uVision3's RealView MDK?

Thanks!

Eric

[ This message was edited by: elsevers on 11-08-2006 18:02 ]

covertlife
Associate II
August 24, 2006
Posted on August 24, 2006 at 12:54

Hi sjo, nice work with the USB idealist ports. Can I also make a request for the DFU project for idealist.

thanks.