none
i.MX23 EVK SDHC Driver Access Problem on Windows Embedded CE 6.0 RRS feed

  • Question

  • Hi all,

    I try to access the SDHC driver of Freescale i.MX23 BSP through stream interface (SHC1: prefix). I wonder whether driver has this functionality because the function CreateFile can not get an instance for it. Should I write a custom kernel-mode driver for this aim? Is there anybody who tries such a thing?

    Thanks in advance for your explanations and helps,

     

    Best regards,

    Yasemin

    Monday, January 17, 2011 8:40 AM

Answers

  • That's the problem then: the device manager will fail the CreateFile and set ERROR_OPEN_FAILED  if XXX_Open returns 0. You have 'only' to understand why SHC_Open is returning 0.
    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    • Marked as answer by yaseminyilmaz Monday, January 17, 2011 11:18 AM
    Monday, January 17, 2011 11:14 AM

All replies

  • What does GetLastError returns after CreateFile fails? Why do you want to access the SDHC controller that way?
    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Monday, January 17, 2011 9:48 AM
  • Hi Mrs. Calligaris,

     

    GetLastError returns  ERROR_OPEN_FAILED (110). I suppose the SDHC driver can not be accessed as a stream interface driver although the SDHC driver has prefix name 'SHC', doesn't it? SDHC driver has SHC_Init, SHC_Open, SHC_Close, SHC_PowerUp, SHC_PowerDown, SHC_IOControl functions. SHC_Open, SHC_Close and SHC_IOControl have no functionality. Can it be the cause of the access problem?

    I've modified the SDHC driver of BSP in order to add IOCTL functionality because I want to control it through DeviceIoControl function. This requirement is for a specific SDIO driver initialization problem.

     

    Thanks a lot for your helps,

     

    Monday, January 17, 2011 10:13 AM
  • Have you got the source code for the driver? It looks like SHC_Open is returning 0


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Monday, January 17, 2011 10:38 AM
  • Yes, you're right. SHC_Open returns 0.
    Monday, January 17, 2011 11:06 AM
  • That's the problem then: the device manager will fail the CreateFile and set ERROR_OPEN_FAILED  if XXX_Open returns 0. You have 'only' to understand why SHC_Open is returning 0.
    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    • Marked as answer by yaseminyilmaz Monday, January 17, 2011 11:18 AM
    Monday, January 17, 2011 11:14 AM
  • I will modify it. Thanks a lot for your helps.
    Monday, January 17, 2011 11:18 AM