Last week I showed you how to use the Coprocessor interface of PowerQuad to calculate (mostly) unary functions. As an example the natural logarithm ln(x) takes just one operand, whilst the floating divide in PowerQuad requires two operands (x1)/(x2). PowerQuad is very efficient accelerating these functions, requiring just 6 clock cycles for the ln(x) and 6 clock cycles for the float (x1)/(x2). In comparison the single-precision floating point unit in Cortex® M4F and M33F requires 13 clock cycles to perform the same float divide.
But there are two ‘sides’ to the PowerQuad:
The Coprocessor interface, using ARMv8-M coprocessor instructions;
The AHB bus interface, where we address PowerQuad as a peripheral.
So this week… operating the PowerQuad as a peripheral. I’ll show you how to use the PowerQuad SDK driver in MCUXpresso in a new project, and use the Matrix Engine in the PowerQuad to solve simultaneous equations.
Clocks. I’ve always found the clock setting of a microcontroller one of the hardest things to get right during my embedded career. If I re-use the clocks setup from the development board it is easy. But if the development board runs from a crystal and I want to use the free-running internal clock, or if I change to a different frequency crystal (and keep the same PLL output frequency) it always gets difficult. To be honest I’ve developed some projects early in my career and never been 100% certain at what frequency the core, flash and peripherals are running.
That’s not good.
The Config Tools within the MCUXpresso brand have greatly simplified setting up the pins, clocks, peripherals (and next week – Trusted Execution Environment 🙂 ) on NXP microcontrollers. So I’m going to quickly show you how to set up 3 different clock arrangements, and output the main clock to an output pin named CLK_OUT.
Well let’s face it, modern microcontrollers are complicated. The User Manual for the LPC55S69 has 1148 pages (Rev 1.3) and that does not include any of the electrical characteristics – see the Datasheet (129 pages) nor does it include the details around the core or instruction set (see ARM documentation) . So there is a lot of technical information to read, and don’t get me started on the pin multiplexing… Well actually, do get me started on the pin multiplexing because that is my focus this week.
This week I turned my attention to writing a very simple example project in MCUXpresso IDE to run on the ARM Cortex® M33 core inside the LPC55S69. As in previous weeks I am again using the LPC55S69-EVK from NXP. My plan is to use this board every week but I have learned recently a few details about a new ultra-low-cost board. It’s going to be AMAZING and I’ll share more details with you when I can.
Hardware Timers are essential to most embedded applications: I use them mostly for triggering actions at a given frequency, such as acquiring data from a sensor. With using an RTOS I can do a similar thing using a task: the task will run with a given frequency and I can periodic work in it. However, using a task might be too much overhead doing this. The good news is that there is a much more efficient way to do this in FreeRTOS with Software Timers. And this is what this tutorial is about: how to use Software Timers with FreeRTOS.
I’m a big fan of ‘low-and-slow’ cooking, and that’s why I love my BBQ Smoker. That smoker is great for Ribs, Brisket or Pulled Pork. But it is not ideal for other pieces of meat. After doing some research, this weekend I tried something differently: “Sous-Vide”. The result is delicious: this is by far the best steak I’ve ever cooked :-).
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!
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.
The summer is showing off, and a heat wave is rolling over Europe and Switzerland with temperatures above 30 degree Celsius. Knowing physics, a way to escape the heat is: going up. And this is what we did. The downside of this is: I postponed my exploration of the Freedom KL25Z board. So instead of a tech post, this is a picture post :grin:…