AnsweredAssumed Answered

How to work with Kinetis MCUs and KSDK, not Freedom boards

Question asked by Enlai Aranzabal on Jun 1, 2017
Latest reply on Jun 5, 2017 by xiangjun.rong

Hi all,

 

First all, I would like to mention how impressed I am with the kinetis microcontrollers, and I have a couple of freedom boards that I tried myself and they work well. I came with a background working with microchip MCUs, but because of some external circumstances I decided to add a different MCU manufacturer to my working portfolio, so I chose the Kinetis MCUs from Freescale now NXP.

 

In my seek of knowledge trying to understand how to work with the kinetis microcontrollers, and learn about their IDE (kds and cw_10.4), how to create projects, how to create programs/firmware, tools and more, I found out the “book of eli” The Book of Eli - Microcontrollers, robotics and warp drives, where Eli explain in some clear and easy manner how to work with a Kinetis microcontroller from scratch (no use of KSDK and/or Processor Expert). I followed this path because I was curious and wanted to understand what really happen with all the register configurations since the initialization of the MCU, passing through peripheral configurations, and finishing with the implementation of some tasks.

 

As I described above I was able to create my own libraries following some concepts from Eli, for instance: I created uart.h/uart.c , gpio.h/gpio.c , ADC.h/ADC.c , and a few other similar libraries(headers/source files) for my current project (some basic implementations). Everything was OK until some recent events, which are forcing me to modify and adding/implement new features to my project, for instance: Serial (uart) Bootloader, SPI/I2C communication, Serial (uart) Emulation on different I/O pins, PWM modules, and some other features,      

Problem Description:

 

1. One of the first problems I was facing was the utilization of a kinetis microcontrollers which is not implemented into a FREEDOM board which is the “KL34Z64” (this MCU was chosen because of reducing the project cost). As per NXP website the closer development tool available for this MCU is the frdm-kl46z, and the main difference between the KL34 and the KL46 is the lack of USB module on the KL34.

 

2. Since the project was turning into a more serious project and with the addition of new features and modules to be implemented. I am worried about the amount of time that it will take to create more libraries of my own, in order to release the project on time. On the other hand, I was reviewing the option of use the KSDK the problem is the all the examples and demos for the drivers (adc, gpio, cop, dma, mcg, spi, and others) are based on the FRDM-KL46Z, and I was trying to modifying it in order to make work for the KL34 without luck, There are many functions and source files to go through that I got lost, even with the simple task to change the clock source from external to internal without luck too.

 

3. A possible issue is the release of a new IDE from NXP. At this moment I don’t know If I should keep using Kinetis Design Studio or change to MCUXpresso, what will be the impact on the project? Is there any advantage using and learning MCUXpresso?

 

Questions:

1. Where can I find learning material about the use of a Kinetis MCU that is not used in a freedom board? (e.i. KL34Z64).

 

2. Where can I find detail information about how the KSDK driver examples are implemented and description about the source files and utilization of them? (How can I modify them in order to make them work on the KL34?)

 

3. On KDS when I create a new project and import the proper platform for my MCU I get “ksdk_platform_libMKL34Z64VLL4” with the OSA folder, the drivers and hal files, How can I implement them properly?, Does anyone know about any source material that I can review?

Kinetis Design Studio or MCUXpresso IDE?

 

Note: I am trying to avoid the use of Processor Expert, because I would like to learn more a little deeply on code (baremetal Project types, and/or use of KSDK only), how the libraries and drivers headers/source files are implemented.   

 

If anyone could give me some advice please, I would greatly appreciate it.

 

Thanks

Outcomes