[En-Nut-Discussion] NutEnterCritical

ml mludwig at adc-elektronik.de
Sat Sep 29 11:41:59 CEST 2007


Hi,

i try to use NutEnterCritical to switch of all Interrupts. In the following
Example my Programm chrashed.
In the debugger i can see that the parameter addr changes it´s  value
completly when 
NutEnterCritical is executed. Any idea ?
May be that it is not needed here but i wonder what happens.

best regards 
Martin Ludwig


unsigned long FlashEraseSector(flashptr_t addr)
{
    NutEnterCritical();   

    FLASHBASE[0x555] = 0xAA;
    FLASHBASE[0xAAA] = 0x55;
    FLASHBASE[0x555] = 0x80;
    FLASHBASE[0x555] = 0xAA;
    FLASHBASE[0xAAA] = 0x55;

    *addr = 0x30;
    NutExitCritical();            

    return FlashWaitReady(addr, (flashdat_t)-1);
}

-- 
View this message in context: http://www.nabble.com/NutEnterCritical-tf4538764.html#a12953857
Sent from the MicroControllers - Ethernut mailing list archive at Nabble.com.




More information about the En-Nut-Discussion mailing list