cancel
Showing results for 
Search instead for 
Did you mean: 

keil USB host with ST standard library

sami
Associate II
Posted on March 23, 2013 at 11:52

Hi

I am trying to create a USB host project with keil library (USB HOST and FILE system) + ST standard library ;

I always get the error

OTG_HS_DFIFO  Not found ...

those fifos are defined in STM32F4XXH in keil but not in the one for ST ! how can i fix this ?

Thank you
3 REPLIES 3
Posted on March 23, 2013 at 13:14

Keil edited those defines in there, ST has a different set in STM32_USB-Host-Device_Lib_V2.1.0\Libraries\STM32_USB_OTG_Driver\inc\usb_regs.h

I'd suggest block copying the defines you need into your code tree somewhere. Perhaps with an #ifdef around them?

* @version V1.0.0RC1 - edited by Keil
#define OTG_HS_BASE (AHB1PERIPH_BASE + 0x20000)
#define OTG_HS_DFIFO0_BASE (OTG_HS_BASE + 0x01000)
#define OTG_HS_DFIFO1_BASE (OTG_HS_BASE + 0x02000)
#define OTG_HS_DFIFO2_BASE (OTG_HS_BASE + 0x03000)
#define OTG_HS_DFIFO3_BASE (OTG_HS_BASE + 0x04000)
#define OTG_HS_DFIFO4_BASE (OTG_HS_BASE + 0x05000)
#define OTG_HS_DFIFO5_BASE (OTG_HS_BASE + 0x06000)
#define OTG_HS_DFIFO6_BASE (OTG_HS_BASE + 0x07000)
#define OTG_HS_DFIFO7_BASE (OTG_HS_BASE + 0x08000)
#define OTG_HS_DFIFO8_BASE (OTG_HS_BASE + 0x09000)
#define OTG_HS_DFIFO9_BASE (OTG_HS_BASE + 0x0A000)
#define OTG_HS_DFIFO10_BASE (OTG_HS_BASE + 0x0B000)
#define OTG_HS_DFIFO11_BASE (OTG_HS_BASE + 0x0C000)
#define OTG_HS_DFIFO12_BASE (OTG_HS_BASE + 0x0D000)
#define OTG_HS_DFIFO13_BASE (OTG_HS_BASE + 0x0E000)
#define OTG_HS_DFIFO14_BASE (OTG_HS_BASE + 0x0F000)
#define OTG_HS_DFIFO15_BASE (OTG_HS_BASE + 0x10000)
/*!< AHB2 peripherals */
#define OTG_FS_BASE (AHB2PERIPH_BASE + 0x00000)
#define OTG_FS_DFIFO0_BASE (OTG_FS_BASE + 0x01000)
#define OTG_FS_DFIFO1_BASE (OTG_FS_BASE + 0x02000)
#define OTG_FS_DFIFO2_BASE (OTG_FS_BASE + 0x03000)
#define OTG_FS_DFIFO3_BASE (OTG_FS_BASE + 0x04000)
#define OTG_FS_DFIFO4_BASE (OTG_FS_BASE + 0x05000)
#define OTG_FS_DFIFO5_BASE (OTG_FS_BASE + 0x06000)
#define OTG_FS_DFIFO6_BASE (OTG_FS_BASE + 0x07000)
#define OTG_FS_DFIFO7_BASE (OTG_FS_BASE + 0x08000)

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

Thank you Clive ,

I will try that tomorrow .

Have anyone modified the example of keil MSD_file to work with discovery board ?

The example always fail to detect the USB stick .. I dont know what i am missing there .

Thank you

sami
Associate II
Posted on April 08, 2013 at 14:39

Any one success to make the MSD_file project in keil to work with the Discovery board ?

I always get that the device is not attached .

What could be the problem?

Regards

Esat