Enabling/Disabling FXOS8700CQ Device Needs a Delay


Found an interesting behaviour with the Freescale FXOS8700CQ on the new Sumo Robots (see “Sensor and Communication Shield for Sumo Robot“): when enabling the accelerometer/magnetometer, it actually did not work:

Failed to Enable FXOS8700 Accelerometer

Failed to Enable FXOS8700 Accelerometer

Continue reading

Advertisements

IoT: FreeRTOS Down to the Micro Amps


University research projects can be a lot fun, and are very challenging the same time. The good thing is that there is always someting new to learn :-).

This week-end I was working on my Internet of Things (IoT) project, based on a Freescale KL15Z and a nRF24L01+ transceiver. In essence it is a wireless data logger. For this, I only can afford a few micro amps consumed by the whole board over an extended period of time. I mean 21 micro amps for running a whole board with sensor, EEPROM, wireless transceiver, operating system and an ARM Cortex-M0+ ready to crunch numbers at 20 MHz 🙂

21 micro amps for wireless sensor node

21 micro amps for wireless sensor node (when not sending)

Continue reading

Review: New FRDM-KL26Z Board


I probably would have missed the fact that Freescale has released a new Freedom board, if I would not have visited my local distributor site to order a replacement for one of my first FRDM-KL25Z boards. So surprise, surprise: there is a new Freedom board: the FRDM-KL26Z!

FRDM-KL26Z Board

FRDM-KL26Z Board

So instead ordering again a FRDM-KL25Z, I decided to order that new FRDM-KL26Z instead. And it arrived right before Christmas, and now I had time to check it out. Nope, I did *not* use it as a blinking gadget on a Christmas tree, even if that would have been a nice idea ;-).

Continue reading

Bit-Banging I2C with ResetBus() Functionality


The good thing with the internet is: it allows engineers to collaborate. And here is an example: Marc is a reader of this blog had a problem with the I2C hardware of a Freescale Kinetis ARM microcontroller. In his case, the I2C bus could be stuck, and there seems no way to reset it with the I2C hardware on the microcontroller. So a solution would be to reset it with software instead.

Bit Banging Software I2C Driver

Bit Banging Software I2C Driver

Continue reading

Zumo Robot assembled


This week we were busy with building and documenting the first robots based on the Zumo Robot Chassis PCB.

Chassis Base PCB

The chassis is designed to hook up the FRDM-KL25Z board from Freescale. It is using parts from Pololu (chassis, motors, DC-DC converter, line sensor, H-Bridge, encoders):

ZumoBaseBoardOverview

Zumo Base Board Overview

Continue reading

Extended Driver for the MMA8451Q Accelerometer


In “Tutorial: Accelerating the KL25Z Freedom Board” I used the MMA8451Q accelerometer on the FRDM-KL25Z board in a very primitive way: I’m reading directly some low-level registers from the device through an I2C low-level component. No calibrating, no special device feature setting, only raw values. Since then, things have been evolved: In “Tutorial: Creating a Processor Expert Component for an Accelerometer” I started to create a driver for this accelerometer, and since then a lot more functionality has been added.

Tracing Accelerometer Values to the Shell

Traced Accelerometer Values to the Shell

Continue reading

Tutorial: Creating a Processor Expert Component for an Accelerometer


If you are a frequent reader of this blog, then you know: I’m a big fan of Processor Expert components. While there are many Processor Expert components delivered with CodeWarrior, it lacks many components and device drivers beside of the normal on-chip peripherals. But value gets added to an embedded project with all the external devices, sensors and actuators. That’s why I have created many more components which are available on my GitHub site. Readers of this blog have asked several times to create a tutorial on how to create a Processor Expert component. So why not working on that on a long Easter weekend full of cold rain and snow?

So here we go: a tutorial how to create a Processor Expert component for the MMA8451Q accelerometer found on the FRDM-KL25Z board:

MMA8451Q Accelerometer on the FRDM-KL25Z Board

MMA8451Q Accelerometer on the FRDM-KL25Z Board

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

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

Arduino Data-Logger Shield with the FRDM-KL25Z Board


One success factor of the Arduino platform is the broad availability so-called ‘shields’: hardware plugin-modules which extend the capability of platform. Shieldlist.org currently lists 288 different shields available! Clearly, Freescale wants to benefit from that ecosystem with the Freedom FRDM-KL25Z board which features Arduino compatible headers. Time to use the Freedom board with an Arduino shield :-).

Data Logger Shield on Top of Freedom Board

Data Logger Shield on Top of Freedom Board

Continue reading

Tutorial: Accelerating the KL25Z Freedom Board


In “Tutorial: Enlightning the Freedom KL25Z Board” I used the RGB LED on the FRDM-KL25Z board. This tutorial extends it to use the MMA8451Q inertial sensor on the board which is connected through I2C to the KL25Z processor:

Freedom Board Block Diagram

Freedom Board Block Diagram with MMA8451Q (lower right corner)

The goal is show the accelerometer x, y and z-axis on the RGB LED.

Continue reading

Bit Banging I2C


The Freescale ColdFire V2 (MCF52259) is a great communication device: an embedded Processor like a Swiss Army Knife: Great peripherals, USB and Ethernet interface, a lot of flash application space and up to 64 KByte of RAM. I’m using that core in many projects, and there is great community support for it with boards and software. Unfortunately Freescale somehow provides Processor Expert support only half way for it. Support for the I2C bus is missing :-(.

Continue reading