This code is tho put in evidence a BUG in the TIMER implementation on Nordic TIMER bug nRF51822. This Example was created for plateform nRF51-DK. Led 2 will stop blinking (crashed main) when user button is pressed several time. User button start an interrpt, the interrupt set a tickker timer 200ms laterthe change LED 1. Meanwhile in the main loop LED 2 is changing state. You will see taht after a chile LED2 will sotp blinking meaning that program is crashed.

Dependencies:   mbed

Fork of mbed_blinky by Mbed

Committer:
stevep
Date:
Tue Mar 18 11:04:22 2014 +0000
Revision:
3:2e347c65be00
Parent:
2:c30dc3ae7426
Child:
4:81cea7a352b0
revert

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dan 0:7dec7e9ac085 1 #include "mbed.h"
dan 0:7dec7e9ac085 2
dan 0:7dec7e9ac085 3 DigitalOut myled(LED1);
dan 0:7dec7e9ac085 4
dan 0:7dec7e9ac085 5 int main() {
dan 0:7dec7e9ac085 6 while(1) {
dan 0:7dec7e9ac085 7 myled = 1;
dan 0:7dec7e9ac085 8 wait(0.2);
dan 0:7dec7e9ac085 9 myled = 0;
stevep 3:2e347c65be00 10 wait(0.2); }
dan 0:7dec7e9ac085 11 }