[En-Nut-Discussion] Misterious Buffer init

Wiegelmann, Jörg Joerg.Wiegelmann at ces-tronics.de
Fri Nov 14 15:11:44 CET 2008


Hello folks,

I have a strange problem. 

With the new ethernut beta 4.7.4.0 on eir the spi flash doesn't work anymore. 

With the eclipse Debugger I see the following behaviour in the OS-function At45dbGetStatus.

 

uint8_t At45dbGetStatus(int dd)

{

    uint8_t buf[2] = { DFCMD_READ_STATUS, 0xFF }; 

!<Breakpoint>!

    if (At91SpiTransfer2(dcbtab[dd].dcb_spibas, dcbtab[dd].dcb_spipcs, buf, buf, 2, NULL, NULL, 0)) {

        return (uint8_t) - 1;

    }

    return buf[1];

}

 

At the breakpoint in the debugger the buf array has the value 

buf[0]      0     

buf[1]      0xff 

 

But the define DFCMD_READ_STATUS has the value 0xD7

 

I increased the size of the main stack to 1512 Byte without success. 

I'm really confused about this.

Any idea? 

 

Thank you and best regards 

Jörg 

 

 

 



More information about the En-Nut-Discussion mailing list