AnsweredAssumed Answered

How to start developing for Kl27Z

Question asked by Denis Leskovar on Oct 2, 2016
Latest reply on Oct 3, 2016 by Denis Leskovar

Hello,

 

I just recived my KL27Z board, and now I am totally lost. I tried blue led blink example from offical webpage, under tab Getting started and project won't compile because kPORT_MuxAsGpio is not defined. In other words, I was searching internet on how to acutally start, how load programs how to debug, how is everything executed, where to upload programs, what is difference, what is bootloader, how to toggle pins, which register is which. I have examples but they don't provide any help if they don't work from start or I can't actually chech if it working. Any help will be much appreciated. Also, I don't know which COM port to choose in Putty, I am using linux and Kinetis Design Studio

 

that is blink code that doesn't work

 

#include "fsl_device_registers.h"
#include "fsl_debug_console.h"
#include "board.h"
#include "pin_mux.h"
#include "clock_config.h"

int main(void) {

volatile uint32_t delay;

BOARD_InitPins();
BOARD_BootClockRUN();
BOARD_InitDebugConsole();

PRINTF("myProject project\n\r");

// Enable the clock to the PORT module that the LED is on.
CLOCK_EnableClock(kCLOCK_PortA);

// Set the PORT configuration - from DISABLED -> GPIO.
PORT_SetPinMux(BOARD_LED_BLUE_GPIO_PORT, BOARD_LED_BLUE_GPIO_PIN, kPORT_MuxAsGpio);

// Initialize the blue LED.
LED_BLUE_INIT(LOGIC_LED_OFF);

for (;;)
{
LED_BLUE_TOGGLE();

delay = 5000000;
while(delay--);

}
}

 

thank you

Outcomes