2013-04-24 01:30 AM
Hi, I'm getting started, would like to see some USB / PC interfacing. I have the STM3210C-EVAL, I'm using IAR and JLINK and have my own project compiling and running ok.
I downloaded the doc athttp://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/CD00158241.pdf
and the code athttp://www.st.com/web/en/catalog/tools/PF257917
Itried the Joystick Mouse demo. In the manual, it says �To select the STMicroelectronics evaluation board used to run the demo, uncomment the corresponding line in the platform_config.h file.�
I have a STM3210C eval, the ones on offer are:
STM3210B
STM3210E
I tried both, but I get �Driver � Fatal error: ST-Link Connection error Session Aboorted�, then
�Failed to load flash loader ��.FlashSTM32F10xxe.flash� (but the file does exist on my system), then
�A fatal error has occurred�
Is it because there is no demo for the c version of the eval board? That would be annoying! Can I get it running on the c version?
Thanks
#usb2013-04-24 01:47 AM
I
tried the Joystick Mouse demo. In the manual, it says “To select the STMicroelectronics evaluation board used to run the demo, uncomment the corresponding line in the platform_config.h file.�?
That implies that you have opened and setup this project in your IDE, and rebuild it afterwards.
I tried both, but I get “Driver – Fatal error: ST-Link Connection error Session Aboorted�?, then
“Failed to load flash loader …….FlashSTM32F10xxe.flash�? (but the file does exist on my system), then ... You mentioned to use IAR and JLink (not STLink), so this is wrong. There is a ready-made project for IAR, I believe, but you will need to adapt it to your debug adapter. Open the project properties, and change it accordingly. I'm no IAR WB user, but there should be documentations & tutorials around.
2013-04-24 03:00 AM
Thanks, I did not think to check the selected debugger, changed it to jlink and it now builds and runs. But in Main, bDeveiceState is 0, so it does not go into Joystick_Send. Why is it not configured? I have a USB cable from the EVAL to my PC, is that enough or do I have to do something else?
2013-04-24 04:10 AM
I neither have this eval board, nor I'm using IAR WB, so I might only guess.
The documentation is not really exhaustive, but your board is not listed. You could try the configurations for the B and E eval boards, but a better way is to compare the schematics of your board to the others, and make changes if required. At least the USB interface lines and some EXTI GPIO lines should be checked, at least regarding to the documentation. Does the USB initialisation finish without error ? Does your eval board turn up as USB device on the Host PC ? Some datasheet / reference manual research and target debugging might become involved in this course.2013-04-24 04:10 AM
For the STM3210C-EVAL you should be using this library
http://www.st.com/web/en/catalog/tools/PF257882
The STM32F105/107 are from the ''Connectivity'' series and have a different USB implementation than the other F1 series parts.2013-04-24 07:32 AM
Thanks.
Not sure I'm being a bit daft but still can't find anything that works. The project that looks best for the STM3210C-EVAL seems to be in folder STM32_USB-Host-Device_Lib_V2.1.0\Project\USB_Host_Device_Examples\DRD\EWARM, project USB_Host_device.ewwI can run this -I get a menu on the eval screen, I can move a red bar over 3 items, but none of the buttons seem to select the item?Or am I running the wrong project?Thanks2013-04-24 07:35 AM
... or perhaps I shoulf be running the project in
STM32_USB-Host-Device_Lib_V2.1.0\Project\USB_Device_Examples\HID\EWARM.. but that seems to be set up for STM322xG ??2013-04-24 07:39 AM
.. but that seems to be set up for STM322xG ??
Not an IAR guy, but looks to have a ''STM3210C-EVAL_USBD-FS'' Target Selection.2013-04-24 08:44 AM
Many thanks for your help, big learning curve for me, but starting to make some progress now. I had started changing all the files to make it work for SMT32107, had not realised I just open the project and select my target in the dropdown below workspace!
Now have mouse / joystick running, excellent. What I want to end up with is the ability to send short fast messages between my PC app written in dotnet, and my stm target, over usb. Any good suggestions for the easiest / quickest way to get something going?Many thanks2013-04-24 08:57 AM
Can't really help you with that, .NET was the point I realized Microsoft had ''Jumped the Shark''