cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746G- usb device mass storage with RTOS

rajesh23
Associate II
Posted on July 19, 2016 at 16:03

hi,

     i have compiled and flashed the USB mass storage standalone project from STM32Cube_FW_F7_V1.1.0 STM32F746G MCU it works fine.

but i have linked the same files with my project with RTOS now it showing in computer ''Format the disk to use''.

And one more question i am new to STM32F746G with STM32CubeMX i have evaluation code but i cant able to find *.ioc files for cube mx.

I don't know to configure a new project in cubeMx for sdram and Fat file system, can you any one help me by giving a basic configuration file for cubemx for STM32F746G.

Regards.

Rajesh

#dogfooding #comment-of-the-day #usb #discovery #massstorage
9 REPLIES 9
slimen
Senior
Posted on July 19, 2016 at 17:26

Hi,

I suggest to you using the last version of

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef7.html

:  STM32Cube_FW_F7_V1.4.0 which contains bug fixes and enhancement and you can refer to the USB examples under this package, it maybe helpful : STM32Cube_FW_F7_V1.4.0\Projects\STM32746G-Discovery\Applications\USB_Device\MSC_Standalone

For more detail about STM32CubeMX tool, take a look to this user Manual 

http://www.st.com/content/ccc/resource/technical/document/user_manual/10/c5/1a/43/3a/70/43/7d/DM00104712.pdf/files/DM00104712.pdf/jcr:content/translations/en.DM00104712.pdf

.

About find .ioc, the workaround is to save your project as a new project: select the menu ''File > Save Project as'' and specify there a new project name and destination folder.

This step will create you the project folder with saving your .ioc file.Regards

Walid FTITI_O
Senior II
Posted on July 19, 2016 at 17:45

Hi d.rajesh.001,

Try to increase the heap size, it should solve the problem.

-Hannibal-

rajesh23
Associate II
Posted on July 21, 2016 at 15:42

Hi,

thanks for your valuable reply,

due to my computer problem i cant able to try above solution for that project , now i am working on newcomputer.

I am using

STM32F746G-Disco

Demo board and i am new to this STM

I have generated to USB mass storage with

STM32 cubemx

, and flashed the code it was not running.

I don't know how to configure SDRam and MicroSD and Qspi.

Can anyone help me by providing *ioc file of

STM32F746G-isco,

configured with mass storage.

Regards

Rajesh

________________

Attachments :

usbMassStorage.ioc : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HziF&d=%2Fa%2F0X0000000bOf%2F_yxQztYKjBCmiZHL0HuiXcaQr5X9RX4XnCPqLiAxqbk&asPdf=false
rajesh23
Associate II
Posted on July 22, 2016 at 11:27

hi,

i have configured the mass storage using cubemx,

but my code is not working it shows ''format disk to use'' in my system.

here i have attached the configuration file

can you any help me please.

regards

Rajesh

________________

Attachments :

massStorage3.ioc : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HziT&d=%2Fa%2F0X0000000bOg%2F2DQmcdOnXDP8zb5o35.uBwERi2gBmqs4HdFpSPr.Z38&asPdf=false
kuchura
Associate
Posted on July 26, 2016 at 13:16

Cube examples don't consider the fact that STM32F7 has data cache (L1). This leads to many cache coherency problems when DMA transfers are used. Some examples work only by some miracle, trying to move that code to other project leads to strange failures.

Try disabling data cache in main.c. If the code works, this is the reason (though, the syste will become very slow). Then enable the D-cache back, and consider adding SCB_CleanDCache_by_Addr() call right before DMA write, and SCB_InvalidateDCache_by_Addr() right after DMA reads.

Also, ensure that all data buffers used in your code for DMA transfers are aligned to 32 byte boundary. Find USBD_MSC_BOT_HandleTypeDef definition in the usbd_msc.h, e and move its bot_data[] buffer to the very beginning of the structure. Then, remove USBD_malloc and USBD_free calls in the code, use pointer to the 32-byte aligned static USBD_MSC_BOT_HandleTypeDef variable instead.

Posted on July 26, 2016 at 15:02

Some examples work only by some miracle...

Amen to that, because there doesn't seem to be a lot of testing or real world application of the code. As an EE it sometimes scares me what CS grads come up with.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Walid FTITI_O
Senior II
Posted on July 26, 2016 at 19:30

Hi d.rajesh.001,

I have tested the .ioc file that you shared , compile and generate code and everything is ok (no message as you indicated.

Check if you are using CubeMx 4.16.0 and Firmware package STM32Cube FW_F7 V1.4.1 version.

-Hannibal-

rajesh23
Associate II
Posted on August 17, 2016 at 07:41

hi,

here i have attached project i tried compiled using STM32 ac6 ide.

i have generated project using STM32 cube mx version 4.0 , stm32cube V1.0

STM32Cube FW_F7 V1.4.1

i tired many times it was not working for me.

what is the reson why usb not enumerating ?

it it was worked for you what are the thing you done in that what is IDE and Compiler used by you /

Regards

Rajesh

________________

Attachments :

FATtest.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyP8&d=%2Fa%2F0X0000000bOe%2FaufX3wf2uUdTRqBND8Kwyzu8XM8VTjYX6Yz9HeE.fyo&asPdf=false
Walid FTITI_O
Senior II
Posted on August 17, 2016 at 11:26

Hi d.rajesh.001,

What is the OS version of you computer (windows 8? 10 .. ?).

Try to test with another IDE ( keil for example). Have you an Error message ?

Which hardware yaou are using ? and did you tried as I tiold you before to increase the heap size in the CubeMx setting ?

-Hannibal-