2012 in review: Happy New Year, and thanks for reading!

Thanks for reading and following this blog, for all the comments and suggestions and the encouraging feedback!  And many new exciting projects are waiting for 2013 :-).

Happy New Year!
Erich

PS: If you believe in statistics and numbers, then here is something for you: The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

19,000 people fit into the new Barclays Center to see Jay-Z perform. This blog was viewed about 110,000 times in 2012. If it were a concert at the Barclays Center, it would take about 6 sold-out performances for that many people to see it.

Click here to see the complete report.

Advertisements

A new Freedom Board: FRDM-KL05Z

Christmas and New Year time is great: Gifts and time to work on my home projects. But this post is not about one gift I have organized for myself: a Raspberry Pi ;-)). No, this post is about a gift I have received from Freescale: a *new* Freedom board, the FRDM-KL05Z :-).

FRDM-KL05Z Board and Box

FRDM-KL05Z Board and Box

Continue reading

PWM and Shell for a LED

Controlling a LED is a great starter for any embedded project: simple and you immediately get feedback if it works :-). Even better: as driving a LED is not different from working with another digital I/O or controlling a solenoid, the ‘LED’ concept and driver is very universal. I recently have simplified my Processor Expert LED component, so it might be a good time to add some more functionality again ;-). Let’s add support for PWM, and adding a shell interface on top of it. That way the LED is dimmable, plus I can do everything with a command interface as well:

LED Properties

LED Properties

Continue reading

An Idea for the New Year, and Asking for Your Opinion

The year 2012 is coming to an end, and luckily the end of the world is postponed :-). So time to make plans for the year 2013! And here is one I would like to ask your opinion about it: A public repository for Processor Expert components.

Continue reading

A Processor Expert Component to Help with Hard Faults

Ahrg! Again my ARM application crashed somewhere and I ended up in a HardFault exception :-(. In my earlier post I used a handler to get information from the processor what happened. But it is painful to add this handler again and again. So I decided to make things easier for me: with a special HardFault Processor Expert component :-).

After adding this HardFault component to my project, it automatically adds an entry to the vector table. So no manual steps are needed: having the component in the project and enabled will do the needed steps.

Continue reading

Migrating Kinetis-L Projects from Beta to Final MCU 10.3

I have successfully used CodeWarrior for MCU10.3 beta version for many projects. With the advent of the final CodeWarrior for MCU10.3, I want to migrate my existing projects to the new and final version. First: my existing projects work as well in the final version, which is good news. But there are two things to change to take advantage of the final 10.3:

  1. Linker file memory split
  2. ARM Micro Trace Buffer (MTB) support

Continue reading

LED’s for Kinetis, simplified

Sometimes it takes a while until things get better. Same thing applies to software: from time to time a refactoring and simplification makes sense. Especially if the underlying technology has been improved. With CodeWarrior for MCU10.3 available, it is time to refactor the LED component.

Continue reading

CSI Crime Scene Investigation with I2CSpy and Freedom Board

The CSI is one of my favorite crime drama television series: not because it reflects the true reality, but because it is fun watching how they always find new ways how to investigate a crime scene with ‘close to reality’ tools. Real CSI is different: you only do a small part of the investigation chain. As for myself, I’m engaged in a research project at the university to develop hardware and software for crime scene investigation :-).

One area of that research project is to retrieve and data from credit card (ATM) skimming devices: these are devices are attached or inserted into credit or debit card machines and ‘skim’ the card information and the PIN code used. With that information, it is possible to clone a credit card for credit card fraud. Such devices are a big problem, and newer devices are very hard to spot. Simply ‘google’ for pictures for “skimming device” and you will get an idea of the diversity and madness of such devices :-(.

Microscopic investigation of skimming device

Microscopic investigation of skimming device

Continue reading

HD44780 2×16 Character Display for Kinetis and Freedom Board

In my earlier Nokia LCD post I described a ‘free of charge’ way to add a LCD display to my FRDM-KL25Z board. If that Nokia display is not available, or an alphanumeric display is enough, then the Hitachi HD44780 display is a low cost option as well.

The HD44780 (or compatible) display is one of the most common displays available. And they usually conly costs around $10 or less. I have used a ‘blue’ 3.3V version of such a display already in my lectures with a Freescale S08 microcontroller. So I thought it would be nice to port the driver to the Kinetis and the KL25Z on it.

LCD Boards with FRDM-KL25Z

LCD Boards with FRDM-KL25Z

A recent post of TKJ Electronics about such a really inexpensive (only $5) HD44780 display caught my attention. And finally I had two of such TKJ displays in my postal mail box yesterday. Time to have some fun on a weekend 🙂

Continue reading

Reducing Code Size with gcc and EWL

If you have not noticed: the final CodeWarrior for MCU10.3 has been released on the Freescale web :-).

It comes with a few changes compared to the 10.3beta release, and one is about the library configuration. I noticed that new projects created with the wizard are around 4 KByte larger than I expect them to be. For example my rather simple application below uses 8 KByte of code, where my expectation would be in the range of around 4 KByte:

   text       data        bss        dec        hex    filename
   8644         24       1108       9776       2630    Freedom_2x16_HTA.elf

Continue reading

Zero Cost 84×48 Graphical LCD for the Freedom Board

The Freedom KL25Z board has a great price of less than $15. Adding a typical LCD usually will add a multiple of that price to the budget. But hey, there is a way to add a LCD to that board at almost no costs! With the idea that I have an old outdated Nokia phone, and the cost of a small capacitor plus some wires are considered as ‘zero’ ;-).

Say Hello from the Freedom Board

Say Hello from the Freedom Board

Continue reading

FRDM-KL25Z with the Arduino Motor Shield

The great thing with the Freedom FRDM-KL25Z board is its compatibility with Arduino Shields: a great set of board available at very reasonable prices. I had my hands on the Adafruit Data Logger shield, and now it was time to use the original Arduino Motor Shield R3.

Freedom FRDM-KL25Z with Arduino Motor Shield and Arexx Chassis

Freedom FRDM-KL25Z with Arduino Motor Shield and Arexx Chassis

Continue reading

Adding Symbols to the CodeWarrior Debugger

On the TWR-LCD, I’m using a USB MSD bootloader. In Programming part of flash I showed how to download and debug the application on top of the bootloader. But how to debug both the bootloader and the application? At the same time with CodeWarrior for MCU? The magic key is tell CodeWarrior to use ‘Other Executables’.

Continue reading

Processor Expert Maxim I2C RTC for the Arduino Data Logger Shield

There was one part missing to complete the software support for my Arduino DataLogger Shield on top of my FRDM-KL25Z Freedom board: support for the Maxim DS1307 RTC (Real Time Clock).

DS1307 on the Adafruit Data Logger Shield

DS1307 on the Adafruit Data Logger Shield (Source: http://www.ladyada.net/make/logshield/design.html)

Things got delayed a bit, as I first needed to get the I2C infrastructure up and running (see this post). But finally, I have things working :-). I proudly present: RTC_Maxim!

Continue reading

KL25Z and I2C: Missing Repeated Start Condition

I really hate this kind of stuff: I know it should work, but it does not. I’m loosing a lot of time (hours, days, even weeks) to track it down to the root cause. Yes, I create my own bugs. Yes, there are bugs in tools, sources, libraries and components. But what many might not believe: there are bugs in silicon too :-(. If you do not believe, here is one: there is a hardware I2C problem on the KL25Z used on the Freedom board. It worked in one project, but not in another.

❗ The silicon bug described here is present on many Kinetis devices, not only the KL25Z!

Logic Analyzer attached to the FRDM-KL25Z board

Logic Analyzer attached to the FRDM-KL25Z board

So if you are facing a problem where you read 0xFF or wrong values from the I2C bus with the KL25Z, here is probably why (and how to workaround it). The problem showed up with a modified version of the Freedom Accelerometer tutorial….

Continue reading

A Generic I2C High Level Driver

I’m working with the I2C bus recently a lot. I’m using it in a project to reverse-engineering skimming (credit card fraud) devices. I needed to improve one of my applications for the lecture classes where a MCF52259 is communicating with a TWR-LCD display over I2C. And I want to add RTC (Real-Time-Clock) capabilities to my Arduino Data Logger Shield which requires I2C.

The same time I want to have things working with ARM Cortex-M4 and M0+ devices. And here the challenge started: using the I2C_LDD (Logical Device Driver) Processor Expert components for the ARM Kinetis devices is definitely not simple and easy. I want to use my software compatible for both the ARM cores and say for S08 and ColdFire cores. So what I ended up is to write a ‘generic’ I2C driver on top of the low level Processor Expert components: named GenericI2C.

Generic I2C Component

Generic I2C Component

Continue reading