cancel
Showing results for 
Search instead for 
Did you mean: 

How to use STM32F10xUSBLib2.21 ?

antonius
Senior
Posted on August 29, 2013 at 14:04

Guys,

Does anyone have experience on using STM32F10xUSBLib2.21 ?

I couldn't find a port for SDcard SPI on the code...

I tried to find on hw_config.c, but couldn't find a configuration for SDcard connection...

Any helps will be appreciated,

Thanks

#stm32 #usb #mass-storage
6 REPLIES 6
Posted on August 29, 2013 at 15:35

I would suspect the pin configuration can be located with materials about the STM3210C-EVAL board, and the MSC example project for that board

STM32_USB-Host-Device_Lib_V2.1.0\Project\USB_Device_Examples\MSC

STM32_USB-Host-Device_Lib_V2.1.0\Utilities\STM32_EVAL\STM3210C_EVAL\stm3210c_eval.h

STM32_USB-Host-Device_Lib_V2.1.0\Utilities\STM32_EVAL\STM3210C_EVAL\stm3210c_eval_spi_sd.c

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
antonius
Senior
Posted on August 29, 2013 at 16:58

I don't use :

STM3210C_EVAL

That's why I need the configuration file to modify according to my board,

any files that I can modify ?

Thanks

Posted on August 29, 2013 at 17:26

So, review the project, and create you own board support files.

The Utilities directories illustrate how ST solved the board issue, either model your scheme after that, or understand it well enough to address your board, in your own way.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
antonius
Senior
Posted on August 30, 2013 at 01:30

In this code :

/* Configure SPI1 pins: SCK, MISO and MOSI */

  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7;

  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;

  GPIO_Init(GPIOA, &GPIO_InitStructure);

Does it mean

PA5 = SCK

PA6 = MISO

PA7 = MOSI

?

Thanks

Posted on August 30, 2013 at 02:07

What part/board do you have, this isn't code for an STM32F10x part?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
antonius
Senior
Posted on August 30, 2013 at 02:32

directory name : STM32F10xUSBLib2.21

Part I have STM32F103VCT6....

I got that code from msd.c

any ideas ?