Skip to main content
sami
Associate III
Mar 23, 2013 10:52 AM UTC
Question

keil USB host with ST standard library

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
    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    Mar 23, 2013 12:14 PM UTC
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    sami
    samiAuthor
    Associate III
    Mar 23, 2013 9:17 PM UTC
    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
    samiAuthor
    Associate III
    Apr 8, 2013 12:39 PM UTC
    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