cancel
Showing results for 
Search instead for 
Did you mean: 

STM3210C-EVAL - USB examples

ian239955
Associate II
Posted on April 24, 2013 at 10:30

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 at 

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/CD00158241.pdf

and the code at 

http://www.st.com/web/en/catalog/tools/PF257917

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.�

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

#usb
14 REPLIES 14
frankmeyer9
Associate II
Posted on April 24, 2013 at 10:47

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.

ian239955
Associate II
Posted on April 24, 2013 at 12:00

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?

frankmeyer9
Associate II
Posted on April 24, 2013 at 13:10

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.

Posted on April 24, 2013 at 13:10

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.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ian239955
Associate II
Posted on April 24, 2013 at 16:32

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.eww

I 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?

Thanks

ian239955
Associate II
Posted on April 24, 2013 at 16:35

... 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 ??

Posted on April 24, 2013 at 16:39

.. but that seems to be set up for STM322xG ??

Not an IAR guy, but looks to have a ''STM3210C-EVAL_USBD-FS'' Target Selection.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ian239955
Associate II
Posted on April 24, 2013 at 17:44

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 thanks

Posted on April 24, 2013 at 17:57

Can't really help you with that, .NET was the point I realized Microsoft had ''Jumped the Shark''

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..