2013-03-23 03:52 AM
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 you2013-03-23 05:14 AM
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)
2013-03-23 02:17 PM
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 you2013-04-08 05:39 AM