STM32 USB Library and Crossworks
Hello,
I'm trying to get the virtual com port application supplied in the STM32_USB-FS-Device_Lib_V3.1.1 working using CrossWorks.
Now I got it to compile after a lot of searching and including the needed source and header files. Also it loads on the microcontroller without error.
When I try running it, Windows gives a notification about uknown usb device attached, and in the device manager VID and PID are 0000.
Using the debug capabilities from CrossWorks I found the following problem:
Somewhere in the initialization of the NVIC unit, the program jumps and tries to execute the code at 0x20000004. However this is data memory so it can't execute it and the program hangs.
To verify that it wasn't a problem with the debugger I'm using, I used the project files of Ride supplied by the library to compile a binary, and then load it on the microcontroller using CrossWorks and the debugger. Using this method the program runs perfectly.
Can anyone provide me with proper project files for Crossworks or tell me what I may be doing wrong?
Thanks in advance.
Hoisun
-
Now I get an entirely different problem.
I took these steps:
-I used Crossworks to download a firmware upgrade binary to the microcontroller.
-Then I used DfuSe from ST to upgrade the firmware to the virtual com port application I created using Ride.
-After that I tried to look up the question above, by reloading the Crossworks project to the microcontroller. However this time the firmware did what it was supposed to do and windows recognized a serial port.
-Then I tried optimizing for size, because the build is too big. But then windows doesn't recognize it so I switch it off again. And now windows still doesn't recognize the USB device.
Now whenever I debug it, it runs without jumping to SRAM. When I pause the debugger it's always at this address: 0x0800026C and the code at that address is DEFAULT_ISR_HANDLER USB_LP_CAN_RX0_IRQHandler.
I'm really at a loss here, I have no clue why the behaviour changed so much.
Please sign in to leave a comment.
Comments
11 comments