Getting a 96bit Unique ID for each Kinetis Device using MCUXpresso SDK

The NXP Kinetis devices implement a UID (Unique ID) for each device, using the ‘Unique Identification Register) which is part of the SIM (System Integration Module):

SIM Unique ID

SIM Unique ID (NXP K22P144M120SF5RM.pdf Reference Manual)

While this number should be unique, I was wondering last week why students in the labs reported the same UID for multiple robots in the lab. So maybe this number is not so unique as it should be?
Continue reading

New MCU-Link Debug Probe from NXP

The NXP MCUXpressso IDE Release V11.2.1 gave a hint about a coming new debug probe, the MCU-Link which is available now:

MCU-Link debugging the LPC845-BRK Board

MCU-Link in 3D printed enclosure debugging the LPC845-BRK Board

Continue reading

RTOS Trace: TraceX with Microsoft Azure RTOS (aka ThreadX)

Having visibility and insights into a running system is highly valuable or critical: not only for optimizations but as well to verify the system design and behavior. In Getting Started with Microsoft Azure RTOS (aka ThreadX) I showed how to quickly run Azure RTOS. This article is about getting trace out of an ThreadX application and show it in TraceX.

Azure RTOS TraceX

Azure RTOS TraceX

Continue reading

Dark or Light: What is your Preference?

Most of my students seems to prefer the ‘Dark’ desktop and tool theme. So this is getting popular, and I was reluctant to use it. But tools support is getting better (see MCUXpresso IDE) and I switched do the ‘dark’ side for now :-).

But what do you prefer? Not Eclipse in particular, but as a general color theme? Is it the ‘new’ Dark, black, darker-than-dark, … theme?

Dark Theme

Dark Theme

Or is it the ‘classic’ Light, bright, white, … theme?

Light Theme

Light Theme

Please let us know:

Happy undarking 🙂

 

Steps to use FreeRTOS with newlib reentrant Memory Allocation

Reentrancy is an attribute of a piece of code and basically means it can re-entered by another execution flow, for example by an interrupt or by another task or thread. This is an important concept and still a lot of code ‘in the wild’ does violate reentrancy. As a result the application crashes immediately in the best case. Worse it crashes randomly or even worse it behaves incorrectly 😦 .

Reentrancy is always a concern if using standard library functions, including printf() or malloc(). FreeRTOS offers a reentrant wrapper to the standard malloc() and free() (Memory Scheme 3)

Running FreeRTOS with reentrant newlib

Running FreeRTOS with reentrant newlib

Continue reading

Getting Started with Microsoft Azure RTOS (aka ThreadX)

If you are a regular reader of my articles, you probably know that I’m using FreeRTOS in most of my applications, for obvious reasons. But clearly this is not the only RTOS out there. After Microsoft had acquired Express Logic back in April 2019 things kept quite for a while. To me the crown jewel of Express Logic is the ThreadX RTOS. But recently Microsoft is pushing more and more the ‘Azure Sphere’ and trying to monetize the ‘IoT’ (I apologize for mentioning that overused acronym) application space and providing it now free for devices from selected partners which includes NXP now.

Debugging with ThreadX in MCUXpresso IDE

Debugging with ThreadX in MCUXpresso IDE

Continue reading

Building a DIY High Density Philips Hue LED Stripe

Philips Hue Smart LED stripes are great, but they have a disadvantage: the LED density is rather low: one LED cluster (WW, RGB, CW) every 55 mm. This leads to the problem that individual dots might be visible if the LED stripe is directly visible. Even if the LED stripe is used for indirect ambient light it means that individual dots might still be visible on the wall or ceiling. The solution is to create a ‘high density’ Hue smart LED stripe:

Normal vs High Density Philips Hue LED Stripe

Normal vs High Density Philips Hue LED Stripe

Continue reading

Debugging Bootloader and Application with one Debug Session

If having a boot loader running on a micro-controller, it is very useful if both the boot loader and the loaded application can be debugged together:

Bootloader with Application Code

Bootloader with Application Code

Continue reading

Power Measurement with the PEmicro Multilink Universal in Eclipse

Implementing low power in embedded applications implemented can be challenging. Measuring current consumption is a first step to see if the software changes indeed have an effect on the current consumed. The PEmicro Universal Multilink FX debug probe comes with a useful feature to provide power to the target and the same time to measure the current consumption and to show the current used in the Eclipse IDE:

PEmicro power measurement

PEmicro power measurement

Continue reading

tinyK22 Board Rev 1.3 released

The tinyK22 board is a tiny micro controller board we use at the Lucerne University of Applied Sciences and Arts. It is used in many research project, used in lectures and labs and used in most student projects. Because there was no small and breadboard friendly NXP Kinetis board with a debug interface available, we developed one featuring the NXP K22FN512, named the ‘tinyK22‘. Because of the success and high demand we stated a new large production run and used this to upgrade the board to the new Rev 1.3: you might notice already the color change :-).

tinyK22

tinyK22

Continue reading

FreeRTOS and Eclipse Indexer for >5K Lines Source Files

Eclipse has a great built-in source code parser and browser (aka ‘Indexer’). It is basically a built-in compiler which parses the source files and assists the user with code completion and navigation help, making Eclipse this awesome productivity tool. On the downside this background parsing could potentially slow down things, and therefore Eclipse has some default settings to prevent this. Unfortunately, the FreeRTOS Kernel ‘tasks.c’ file is above-and-beyond of a ‘sane’ source file and will hit the default limits: as a result the ‘tasks.c’ file is not indexed and things like ‘Open Declaration‘ might not work for the file ‘tasks.c’.

Open Declaration

Open Declaration

Continue reading

Grouping Eclipse Projects with Working Sets

Typically I have many, many projects listed in the Eclipse Project Explorer, usually more than 100 projects: from example projects, projects on git, lecture module projects, research projects or just some hobby projects I’m working on. With the default Eclipse settings, all these projects are listed in a ‘linear’ list. What I found really useful is the ability to group them into ‘Working Sets‘:

Grouped Projects in Eclipse Project Explorer

Grouped Projects in Eclipse Project Explorer

Continue reading

Tweaking MCUXpresso IDE Black Theme

‘Dark’ or ‘Black’ themes are on vogue: some love it, some do not care. The good thing is that we all have a choice. Things are getting improved on the host OS (Windows/Linux) side, but the challenge is still on the application side, but things are getting better. This is true for the Eclipse based IDEs too, with the NXP MCUXpresso IDE V11.2.1 just recently released: it comes with improved Dark Theme support:

Tweaked MCUXpresso IDE Dark Theme

Tweaked MCUXpresso IDE Dark Theme

Continue reading

Mobile Teacher Tool, Rev 2 by Gerhard

It is always great to see if someone is picking up my work and produces something even better :-). In this case, Gerhard Székely took my DIY Portable Video Conference, Sharing and Teaching Device and created an awesome version of it:

Camera to the front

Camera to the front

Continue reading

MCUXpresso IDE V11.2.1

I have started the semester and labs using the MCUXpresso IDE V11.2.0 which has been available from July this year. The past week I received the notification that the update V11.2.1 is available: time to check it out….

MCUXpresso IDE V11.2.1

MCUXpresso IDE V11.2.1

Continue reading

FreeRTOS V10.4.1 with SEGGER SystemView V3.12

Amazon has released in the past week the FreeRTOS version V10.4.0. Time to upgrade, actually the most recent version 10.4.1! The same time the SEGGER SystemView V3.12 was released back in April this year. No surprise: with the FreeRTOS changes they don’t work out of the box: but no worries, I have you covered and applied all the needed patches and changes to have them working again together: the latest FreeRTOS v10.4.x with Segger SystemView v3.12:

Segger SystemView 3.12 with FreeRTOS 10.4.2

Segger SystemView 3.12 with FreeRTOS 10.4.2

Continue reading

Import Projects from git into Eclipse

As a VCS (Version Control System) I’m using git in all my projects. And not only for software or firmware projects: I’m using it for hardware design (KiCAD, FreeCAD, …) or for documentation (LaTeX, …) too.

The nice thing with the Eclipse IDE is that it supports nice git integration, making importing projects from git repositories easy.

Import Projects from git

Import Projects from git

Continue reading