Liam G
/
MKL05CLK
Hack to show Kinetis ID register via bare metal
Revision 0:0d020b1f3308, committed 2014-04-04
- Comitter:
- liamg
- Date:
- Fri Apr 04 20:08:32 2014 +0000
- Commit message:
- Hack to show Kinetis ID register
Changed in this revision
diff -r 000000000000 -r 0d020b1f3308 head.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/head.h Fri Apr 04 20:08:32 2014 +0000 @@ -0,0 +1,3 @@ + + +#define SIM_SDID (*(volatile unsigned long *)(0x40048024)) // Kinetis ID register \ No newline at end of file
diff -r 000000000000 -r 0d020b1f3308 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Apr 04 20:08:32 2014 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" +#include "head.h" + +Serial pc(USBTX, USBRX); // tx, rx for debug terminal + +DigitalOut myled(LED1); + +int main() { + + myled = 1; + wait(0.2); + myled = 0; + wait(0.2); + + unsigned int ID=0; + + ID=SIM_SDID; + pc.printf("Kinetis ID = %x \n",ID); + + + +}
diff -r 000000000000 -r 0d020b1f3308 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Apr 04 20:08:32 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/7d30d6019079 \ No newline at end of file