I tried CLIVE1‘ example (https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=https%3a%2f%2fmy%2est%2ecom%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fSTM32Discovery%2fSTM32F4-Discovery%20USB%20Mass%20storage&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=9633)
to connect a SD card via STM32F407 eval board to USB. I ported the files into a KEIL project which was setup using the latest drivers provided by ST. I used following preprocessor symbols:
STM32F40_41xxx, HSE_VALUE=8000000, USE_STM32F4_DISCOVERY,USE_STDPERIPH_DRIVER, USE_USB_OTG_FS,USB_OTG_FS_CORE
I checked the CLOCK setting using MCO and a scope and found everything appeared to be clocked correctly. However (I expected something similar) the example does not work (I don’t see anything detected by the USB master PC).
I started with troubleshooting and ended up here:
int8_t STORAGE_Init (uint8_t lun)
which appears to be part of a state machine - however it seems to be not toggled and I don’t know why.
While trialling and erroring I would be very happy if someone could support me by giving a hint were to start with troubleshooting e.g. something like a state machine diagram or a flow chart of what happens inside the example in general.