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.
Category Archives: Embedded
Stepping Backwards while Debugging: Move To Line
It happens to me many times: I’m stepping with the debugger through my code, and ups! I made one step too far!
What now? Restart the whole debugging session?
Actually, there is a way to go ‘backwards’ 🙂
Continue reading
First Steps with the P&E Tracelink
“As an engineer, you should ask for the best tools available. Spending money for better tools can make the difference between finding a problem quickly, or wasting days or weeks, and ultimately failing a project.” (unknown)
I had to learn it the hard way: some ‘hard-to-find-problems’ sometimes only can be found with some amount of luck, or with using a good trace solution. CodeWarrior already supports trace, such as using the MTB on the Cortex-M0+. But with this I’m limited to the on-chip trace buffer or on-chip RAM, which is better than nothing. But to solve the real hard problems, a bit of more power and memory is needed. And here where the P&E Tracelink comes into play: with 128 MByte trace buffer it would allow me to record a lot more trace data :-).
Decoding S19 Files
I’m recently dealing again with S19 (S-Record) files. I can easily generate S19 files from my ARM .elf files, but what I need is a simple decoder of the file format.
The good thing is: such a decoder is provided with CodeWarrior for MCU10.x 🙂
That capability is built into the Decoder.exe which is delivered with the Freescale S08 (or S12) tool chain, and is located inside the MCU\prog folder:
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:
RFduino: Wireless Cortex Arduino to the Size of a Finger Tip
How cool is this: combine ‘Arduino’, ‘Bluetooth’ and ‘Low Power’ with ‘small size’: an ARM Cortex-M0 board with low power Bluetooth 4.0, shrunk to size of a finger tip! 🙂
This Kickstarter project asked for $5k funding, and it has received over $245k! The video shows the prototype interacting with an iPhone:
It combines Arduino compatibility with the power of an ARM Cortex M0. Given the low-cost and versatility of that board, that would make that board an ideal base for many projects.
Adding an internet gateway, and I will have the ‘Internet of Things’ (IoT) 🙂
Happy RFing 🙂
Maze solving FRDM-KL25Z Robot goes backward for Dead-Ends
The maze solving robot based on the Freedom FRDM-KL25Z and Pololu Zumo shield has new features:
- For dead-end paths, instead turning around, the robot is driving backward
- Higher speed for going forward/backward/turns
- In the finish area, the robot turns around
- It reverts the solution path, so the robot can directly run from the finish area to the start
Freedom Logic Analyzer with DMA
The FRDM-KL25Z Open Source Logic Analyzer based on SUMP presented here was already very useful with the added trigger support. But it was not capable to do a sampling rate above a few hundred kHz. That’s ok for slower probing, but not for anything with a higher speed. Using DMA (Direct Memory Access) instead of timer based sampling can remove that limitation :-).
Freedom Robot solves the Maze
Finally I have found some time over the past week-end to enhance my Zumo robot. After I had my line following robot based on the Pololu Zumo chassis and the FRDM-KL25Z, I thought it should be easy and logical to solve a maze. Logical: yes. Easy: not that much. In fact it took me longer than expected. As always, there are a lot of tiny and important problems to solve (the maze alone was easy 🙂 ).
Tutorial: PWM with Processor Expert
For many of my applications I’m using a PWM (Pulse Width Modulated) signal. One example is the motor driver used in this project where I use one PWM signal for each motor. Another usage of PWM is to control the brightness of an LED. Processor Expert makes usage of the PWM hardware easier. Still, for some settings it is good to have the resulting signals in mind. So in this post I’m showing how the settings impact the PWM signal generated.






