This blog is a guide on how to setup using the FatFs library included with the Kinetis SDK 1.2.0 using mostly the Processor expert within Eclipse Luna. FatFs is a generic FAT file system module for small embedded systems written by Chan. I prefer to use Processor Expert when possible as this will often generate code that is smaller in size than using the KSDK library files direct. I experienced many gotcha’s and complication setting this up and wanted to share how I finally managed to get it to work.
I want to make some noise with this post!!! This tutorial is about adding music and sound capabilities to the Freescale Freedom board, and to have a lot of fun with it :-). I need this ability for a larger project working on for a while. But I thought I share that sub-part how to play sound files. So with this tutorial I can turn my Freescale Freedom board into a music or sound player :-). And adding sounds is a cool way for any project, and as the music is stored on an SD card it fits easily hours of music or sounds.
MP3 Player with FRDM-KL25Z and Adafruit Music Maker MP3 Shield
I have received several requests to post a quick note when there is a new release (16-Nov-2014) of the McuOnEclipse components on SourceForge (see “McuOnEclipse Releases on SourceForge“). I have published today a new release, and with following major improvements:
USB support for Kinetis KL24Z
FatFs now features the latest Elm-Chan v0.10c release
Backspace support in Shell
Configuration item in FreeRTOS for Percepio Trace Hooks
I admit: I’m sometimes a lazy person. In my projects, I only needed one ‘disk drive’ with the FatFS Processor Expert component: either a SD card or a USB MSD drive. But a reader of this blog wanted to use FatFS with multiple drives: using it with an SD card and a USB MSD drive. And actually FatFS does support this, I just had no need for it, thus I did not add anything special for it. But that reader let me think that I better add Multi-Drive support. Even if I do not need it now, that could be very handy in the future 🙂
The Freescale FRDM-K64F is a great board for data logger applications: it has a powerful ARM Cortex M4F with 120 MHz, 1 MB Flash and 256 KByte RAM. Best of all: it already has a micro SD card socket on the board :-).
I admit: my Ethernet Shield project got stuck because of too many urgent other priorities. I was not happy with the way the project was using configuration data from FLASH memory: I have now multiple ethernet shields in use, and configuring the IP address for each shield is a pain. I have not got DHCP working (yet), so why not using the SD card on the shield for configuration data? And right on time I received a tip from Marc about MinIni: perfect, exactly what I need!
Naturally, I have several project ideas lingering around. No time to make them all (for now). One of it is interfacing the Raspberry Pi camera with a microcontroller. To store the images, I need plenty of RAM on the device, and so far the Kinetis microcontroller did not have that. Finally, Freescale announced the K64F120 a few months back, and my ordered TWR-K64F120M board arrived on my desk, waiting to be used: Finally I get an ARM Cortex-M4F with 1 MByte of FLASH and 256 KByte of RAM :-).
This is Part 3 of an ongoing tutorial to use the Arduino Ethernet Shield R3 with a Freescale FRDM-KL25Z board (or any other board you like).
In Part 1 I worked on the SD card, in Part 2 I have added basic network connection. Now time to run a web server with my FRDM-KL25Z :-). With this, I can get access to my board through the network, and the board will host a web page where I can do pretty much everything: showing status, or adding functions to turn on things like an LED 🙂
Sometimes it takes a very long time to realize a project. Adding the Arduino Ethernet Shield R3 to one of my Freescale FRDM boards is one of it: it took me a year until I have found a few days to work on using the Ethernet Shield with my FRDM-KL25Z.
FRDM-KL25Z with Ethernet Shield
I have not everything in place yet, so I decided to publish things in parts. So this is about part one: using the Micro SD Card on the Shield.
Summer finally has arrived in Switzerland. Yes, I live in a moderate climate zone, but if the outside temperature goes above 28-30° Celsius as these days, then sleeping at night is not that comfortable as it should be in my view. Luckily, I’m in a good constructed house with good insulation, so it takes a few days until it heats up. But I love to keep the temperature below 25° Celsius, especially at night. I do have a heating system which combines geothermal and solar heating. The question is: how can I use it for cooling during hot summer days? The solution: some extra plumbing, a Freescale Tower system and the Freescale FRDM-KL25Z board 🙂
FRDM-KL25Z with Arduino Data Logger Shield controlling Heating/Cooling System
Not everyone is familiar with Git, and not everyone wants to use it. Although I think using Git or SVN is something every software engineer today needs to master 😉 To make it easier for the ‘non-Gitter’ to use the Processor Expert components, they are available now as *.PEupd files as described here. However, the *.PEupd files are just a snapshot, and not the latest and greatest. So how to use the latest component sources and example projects without Git?
What was missing in the FatFsMemSDHC component presented here is support for a ‘write protection’ pin. Well, that write protection is not present on micro-SD cards, and on normal SD cards it is a simple plastic thing with no real hardware meaning: it is all up to the software to respect it. While my other SD card components have support for such a write protection detection, it was lacking for the FatFsMemSDHC (for Kinetis) component. Time to fix this!
SD Card Lock: an SD-Card, a micro-SD Card and a micro-SD card adapter, both with write-enabled
Bootloaders are a very useful thing: it allows programming an application file without a debugger. This makes it ideal for upgrading a system in the field.
Usually, there are application notes and examples from silicon vendors available. But typically they are for a certain microcontroller, and hard to change it to another system without a lot knowledge about its implementation. What I need for a project based on the FRDM-KL25Z is a bootloader which shall be small and portable. As I’m using Processor Expert to keep my applications portable across different microcontroller families: why not create a bootloader with Processor Expert components? With the Processor Expert drivers available, things can get a lot simpler compared to the ‘traditional’ approach. With less than 10 KByte footprint?