cancel
Showing results for 
Search instead for 
Did you mean: 

USB app. problem.

nickich
Associate II
Posted on September 24, 2008 at 18:50

USB app. problem.

3 REPLIES 3
nickich
Associate II
Posted on May 17, 2011 at 12:45

Dear Forum members,

I used DFU example source code to make an usb application. Everything works fine when I load the application trough 'Flash Loader Demo' SW - The USB communicates perfectly, I can get descriptors, send/rcv packets etc. But when I run the code from flash (without Flash loader), the application hangs when I request interface (or set configuration). As soon I read some memory with the Flash loader, the application runs normally.

I suppose that the Flash Loader SW makes some initializations, that my application (DFU) doesn't.

Can anybody advise with that, please.

Edit: The Flash Loader initializations code will help great suppose. Unfortunately I have no JTAG access to see what's happened.

Thaks!

Cheers,

Nik

[ This message was edited by: nickich on 19-09-2008 12:44 ]

[ This message was edited by: nickich on 19-09-2008 15:39 ]

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

Hi Nik ,

Could you check your boot pins Boot0 and Boot1 and verify that their position is in User Flas Mode rather that System Memory mode when you run your application from Flash ? Hope this helps you.

Cheers,

STOne-32.

nickich
Associate II
Posted on May 17, 2011 at 12:45

Hi,

Thank you for the reply!

I have a jumper soldered in order to switch between Flash and System memory.

Sorry, I didn't explain the situation clearly...so

The device is USB powered.

When I plug in the USB (boot from Flash), the windows finds the device, but when I set interface the device freezes (no more responding).

When I switch to system memory and do some access (read or write Flash) with the Flash Loader Demo software, after that I switch back to Flash mode and reset the device - it works perfectly. But once I power it down at next power up the device freezes after interface setting.

The source code is ported for GNU toolchain - I'm using the CodeSourcery GNU toolchain.

Regards,

Nikolay