This project serves as a template for work with the Freescale FRDM-KL46 board. Support will be added to all on-board peripherals, sensors and I/O.

Dependencies:   FRDM_MMA8451Q MAG3110 TSI mbed

Fork of FRDM-KL46-Template by Mike Maas

Project Information:

Theory

This project has been created to serve as a template for those who wish to use the Freescale Freedom FRDM-KL46Z board. Existing drivers within mbed have been brought together and board specific configurations for certain inputs and outputs have included.

Libraries

TODOs

Hardware Information:

FRDM-KL46Z Information

Freescale Kinetis L-Series Microcontroller Information

Freescale Sensor Information

MMA8451Q

MAG3110

Files at this revision

API Documentation at this revision

Comitter:
mmaas
Date:
Thu Dec 19 15:39:52 2013 +0000
Parent:
1:28c81db67f50
Child:
3:1e85b49a3e18
Commit message:
Online mbed library was updated with fix for enabling pullups on GPIO. Removed local library and added back online library. Works.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-src_KL46_PATCH.lib Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Dec 18 21:17:13 2013 +0000
+++ b/main.cpp	Thu Dec 19 15:39:52 2013 +0000
@@ -4,7 +4,7 @@
 Serial pc(USBTX, USBRX);
 
 // Include support for on-board green and red LEDs
-DigitalOut grnLED(LED_GREEN);
+DigitalOut greenLED(LED_GREEN);
 DigitalOut redLED(LED_RED);
 
 // Definitions for LED states (logic inverted output value 0 = O)
@@ -14,21 +14,33 @@
 int main() {
 
     // Ensure LEDs are off
-    grnLED = LED_OFF;
+    greenLED = LED_OFF;
     redLED = LED_OFF;
      
     // Set Serial Port data rate and say Hello
     pc.baud( 230400 );
     pc.printf("Hello World\r\n");
 
+    // Quick blink LEDs
+    redLED = LED_ON;
+    wait(.05);
+    greenLED = LED_ON;
+    wait(.05);
+    greenLED = LED_OFF;
+    redLED = LED_OFF;
+  
+    wait(1);
+
+
+
     // Blink LEDs - green first
     while(1) {
-        grnLED = LED_ON;
+        greenLED = LED_ON;
         redLED = LED_OFF;
         
         wait(1);
         
-        grnLED = LED_OFF;
+        greenLED = LED_OFF;
         redLED = LED_ON;
 
         wait(1);
--- a/mbed-src_KL46_PATCH.lib	Wed Dec 18 21:17:13 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/sam_grove/code/mbed-src_KL46_PATCH/#e8e1eda2b32b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Dec 19 15:39:52 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/dc225afb6914
\ No newline at end of file