LPC11U24 mbed_reset() not working

04 Jan 2012

Hi,

I started with my new LPC11U24 and tried to use th "undocumented" mbed_reset() funtion, problem is, it does nothing.

extern "C" void mbed_reset();

int counter = 0;

void main() {
    while(1) {
        pc.printf("RESET %u",counter++);
        mbed_reset();
    }
}

... prints

RESET 0RESET 1RESET 2RESET 3RESET 4RESET 5RESET 6RESET 7RESET 8RESET 9RESET 10RESET 11RESET 12RESET 13RESET 14RESET 15RESET 16RESET 17RESET etc.

If I press the button it resets appropriately.

Regards Linus

05 Jan 2012

Hi Linus, thank you for the bug report.

mbed_interface_reset (AKA mbed_reset) is using mbed_interface_connected to verify that the interface chip is actually connected before sending a reset request. The Cortex-M3 has the capability to verify that checking:

(CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk)

The Cortex-M0 and ARM7 have not this capability, therefore we now assume that the interface chip is connected and the reset works as expected.

This fix will appear in the next library release.

Cheers, Emilio

25 Oct 2012

NVIC_SystemReset();