McuOnEclipse Components: 09-July-2017 Release

I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge, with the following major changes and updates:

  • Complete refactoring for 1-Wire stack and DS18B20 temperature sensor components
  • Added HID Joystick device class to the FSL_USB_Stack
  • New SDK_Timer component to work with Kinetis SDK
  • New ST756P LCD driver component
  • New TSL2561 digitial temperature sensor driver
  • Added ReadByte() and WriteByte() GenericI2C functions
  • Added 64bit mapping functions to Utility
  • added configUSE_NEWLIB_REENTRANT and newlib reentrancy support to FreeRTOS
  • Pull resistor support for SDK_BitIO
  • Many smaller bug fixes and enhancements
SourceForge

SourceForge

Continue reading

Advertisements

McuOnEclipse Components: 06-May-2017 Release

I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge, with the following changes and updates:

  • SEGGER SystemView updated to V2.42
  • More components to work with MCUXpresso SDK: GenericSWSPI, FXO8500 and SimpleEvents
  • SSD1351 display driver supports 128×128 pixel resolution and Adafruit 1.5″ breakout module
  • Extended FreeRTOS debug helper settings
  • GenericI2C: added ReadWordAddress8() and ReadWordAddress8() functions
  • RingBuffer with new Getn() and Update() functions
  • Utility with map(), constrain(), random() and randomSetSeed()
  • XFormat: new xsnprintf(), contributed by Engin Lee
  • OneWire protocol component with Maxim DS18B20 temperature sensor
  • Many smaller bug fixes and enhancements
SourceForge

SourceForge

Continue reading

McuOnEclipse Components: 12-Mar-2017 Release

I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge, with the following main features and changes:

  • Wait: Busy-Waiting using ARM DWT cycle counter
  • Percepio FreeRTOS+Trace: Updated to version 3.1.1, simplified usage of streaming and snapshot mode
  • GenericSWI2C: MCUXpresso SDK can be used with the bit-banging I2C driver support
  • FreeRTOS: includes updates of the 9.0.1 release, ‘optimized task selection, enabled MPU support (experimental)
  • Graphical GUI drivers for screens, windows, icons, headers, text widgets and more
  • SSD1351: display driver for Solomon Systech SSD1351 display
  • More components are now supported by the McuLibConfig settings
  • Many other smaller bug fixes and enhancements

Continue reading

Making-Of Sea Shell Sand Clock

The year is coming to an end, the Holiday season is approaching. In case you are looking for a nice present: I have completed my version of a sand clock: a clock writing the time into sand:

Sandclock

Sandclock

If you are interested to build your own version, I have documented the different steps with tips and tricks…

Continue reading

McuOnEclipse Components: 30-Oct-2016 Release

A new McuOnEclipse components release was long overdue, so I’m pleased to announce that a new drop is available with the following major changes:

  • Segger SystemView library with kernel time reporting
  • GenericTimeDate supports different hardware RTC devices
  • Utility with little endian packet handling functions
  • Shell Standard I/O handlers for USB CDC, Segger RTT and Bluetooth
  • FreeRTOS and stack size reporting
  • printf() support in Shell component
  • Various small bug fixes and improvements
SourceForge

SourceForge

Continue reading

McuOnEclipse Components: 17-Oct-2015 Release

On SourceForge I have published an update of the McuOnEclipse software components, with following major changes:

  1. FreeRTOS updated to version V8.2.2 which comes with TLS (Thread Local Storage) support and GDB debug helpers.
  2. Percepio Trace updated to V3.0.2 with the release of Segger Real Time Terminal (RTT) for continuous trace streaming.
  3. FSL_USB_Stack with alternate USB initialization to deal with an issue in combination with the Kinetis SDK v1.3.0
  4. GenericI2C and GenericSWI2C have added support for custom I2C bus handling.

    McuOnEclipse SourceForge Release 2015-10-17

    McuOnEclipse SourceForge Release 2015-10-17

Continue reading

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

Driver for Microchip 24xx Serial EEPROM

For many projects I need to store configuration or sensor data. For this I’m using either an SD card or program the internal flash memory of the microcontroller. Using the internal flash is a good thing as it does not need an external component. However, the typical number of programming cycles is limited to 10k-50k which is a limiting factor if data has to be recorded over a long time or very often. That’s why I’m using the very popular external 24xx external EEPROM devices from Microchip.

24LC512 connected to FRDM-KL25Z

24LC512 connected to FRDM-KL25Z

Continue reading

Device Driver for Freescale MAG3110 Digital Magnetometer

One of the ‘goodies’ of the FRDM-KL46Z is the Freescale MAG3110 magnetometer. The MAG3110 is a tiny 2×2 mm device:

MAG3110 on FRDM-KL46Z

MAG3110 on FRDM-KL46Z

What was missing so far is a Processor Expert component for it. This post is about closing this gap…

Continue reading

How to use MCUonEclipse GitHub without Git

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?

gits in a box

gits in a box

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