cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F3Discovery: USB Mass Storage Mode

awawa
Associate
Posted on October 08, 2013 at 02:35

Hello everyone.

I am a newbie and learning STM32 step by step.

I purchased this Discovery board and set up Keil environment.

I tried USB HID demo and now I want to try to get my board get recognized as USB Mass Storage Device. Further plans are getting data, sent by PC, and encoding them using some block cipher. No need in SD-cards or other disks on this stage � only PC recognizing board as Mass Storage.

Sadly I'm not very fluent in STM32 coding, and examples, found on internet, were not very helpful due to  very chip-based implementations and differences in registers / headers / etc.

So I decided to modify the original demo, but, as mentioned above, due to lack of experience I don't have lot of ideas about it.

First thoughts are: we have USB_Example/usb_desc.c file, which apparently contains description of HID device. But data in struct fields is hex, and seems like it is about diving into USB Protocol is a search of suitable set of parameters.

So my questions are: am I going in right direction? Is it all about deep layers of USB Protocol? Are there any notable examples of USB Mass Storage Device realization on F3Discovery boards?

Any help will do.

Best regards.

#stm32f3 #usb #mass-storage
2 REPLIES 2
crt2
Associate II
Posted on October 08, 2013 at 15:53

New to stm32 and learning step by step does not make USB a FIRST step. I suggest something simpler to start with as USART and a simple hello-world. That way you will at least learn to handle the registers - later you can use DMA for USART and that will be 1 step up, then after that you'd consider USB and all its ''features''

awawa
Associate
Posted on October 08, 2013 at 17:25

Thanks for reply.

USB is not my first step, in fact previously I've adapted RC5 algorytm demo in C for this board, and now I'm going to establish interaction between plate and PC. I will do USART in any case, but current subject is more of interest to me. I will appreciate any directions in this field.