AnsweredAssumed Answered

fopen fails with esdhc

Question asked by Michele Marchetti on Oct 31, 2011
Latest reply on Dec 13, 2011 by Petr MacHala

Dear all,

I have this problem with kwikstik-k40 rev 5, but it works when using twr-k60 and I was suggest it maybe an MQX problem.
I am trying to access the SDCARD and I am using CodeWarrior 10.1.

When attempting to access to esdhc I get the following error:

    com_handle = fopen("esdhc:", NULL);
    if( !com_handle ) {
        printf("DBG: Opening ESDHC device failed, is ESDHC controller enabled in MQX?");        

Problem is that I have to enable ESDHC in bsp, but the
file retreives me the following error:
#error This modul unsupported with Kiwkstik Board.Please disable BSPCFG_ENABLE_ESDHC to 0 in user_config.h

So I have just disabled this error and recompiled bsp & psp to get rid of the error (but is anything else to be done?).

Then I try to access the esdhc and I still get the error of above.
It fails while doing fopen()... and I cannot understand why.

For what I can see the execution goes in here:
in io_fopen.c #93

   if (dev_ptr == (pointer)&kernel_data->IO_DEVICES.NEXT) {



Does anyone have any clue please?

thanks in advance for any suggestion,