Freescale/Farnell/Element14 announced last week a new Freedom Board: the FRDM-K20D50M :-). As you can expect, I was not able to resist, and ordered one from my local Farnell store right away. So I did my first steps with it on this sunny and wonderful weekend (yes! we skipped Spring Time and entered Summer Time right away!).
I do not need to compare the board with the previous Freedom boards, as I have found an article here. I a nutshell: I get pretty much the same as with the FRDM-KL25Z, but instead of an ARM Cortex-M0+, it has an ARM Cortex-M4!
Farnell.ch sold me the FRDM-KL25Z for CHF 17.05, while the FRDM-K20D50M is listed for CHF 32.25. That’s about twice the price of the FRDM-KL25Z :-(. Ok, I get an ARM Cortex-M4 instead of an ARM Cortex-M0+, but what else? Let’s see.
The board comes in the typical Freedom board, only that it the board is a red one:
The box includes a small bag with the 4 dual-row headers. Nice! That justifies at least some of the higher price.
The front side of the board looks very familiar to the existing FRDM boards:
Having a closer look, there are a few more add-ons:
- There are two crystals: one 32 kHz and one 8 MHz one.
- New analog Ambient Light Sensor with J12 jumper to isolate it
- New Temperature Sensor (U11) with jumper J13 to isolate it (Note: the user manual says that this sensor is *not* populated. However, it is present on my board 🙂 )
- Two jumpers (J16 and J17) to disconnect the I2C lines to the accelerometer
- Jumper J14 to cut the reset line between OpenSDA and the target CPU
- Jumper J13 to isolate the BD1020HFV-TR temperature sensor
- Jumper J21 to enable USB Host support (unprotected), so my hack is not needed any more 🙂
On the backside the battery holder is not populated (same as on earlier Freedom boards):
I noted that many pins on the dual row headers are marked as NC (Not Connected). So J9 could have been a single row header (which would be cheaper?).
Freescale provides at this link an updated OpenSDA package plus bare-metal source code and examples. The source code package is not what I need in the first place as I already have a lot of drivers with Processor Expert, but always good to have such a package.
The Quick-Start Package (FRDM-K20D50M_QSP.zip) has an updated OpenSDA debug application and mass storage bootloader.
The board has the same OpenSDA on-board debug connection, so I had first to load the Debug Application (same procedure as for the FRDM-KL25Z: press the reset button on power-up, load the OpenSDA Debug App, re-power the board).
I loaded that new DEBUG-APP and I do not remember which one was factory installed. Anyway, that v106 worked for me and CodeWarrior for MCU10.3
First Project with CodeWarrior
Using CodeWarrior for MCU10.3, the MK20DX128VLH5 (mask 1N86B) is supported in the Wizard:
The OpenSDA connection is not available in the connection page of the Wizard. But this does not matter, as the normal P&E Multilink connection works. I only have to change the Interface in the debugger settings from P&E Multilink to OpenSDA:
💡 To get to the dialog below: menu Run > Debug Configurations, press ‘Edit…’ button on the Connection in the ‘Main’ tab of the debug connection.
❗ Do not forget to enable the ‘SWD’ debug option. I missed to set this option in the first place, and then the debugger reported “ERR: Can not enter background mode” 😦
Running an emtpy bareboard application was just a matter of minutes. To use more of the board ressources, I added the FreeRTOS operating system, Shell over OpenSDA CDC and RGB LED support to it:
All what I needed to do is to configure the RTOS and assign the proper pins for the LED and serial connection. With Processor Expert this took less than 10 minutes from start until I had a shiny toggling LED on my board 🙂 :
The CodeWarrior project is available on GitHub here and will be extended over time.
That new Freedom board adds a Cortex-M4 to the existing FRDM-KL25Z and FRDM-KL05Z. It comes with the headers, plus temperature and ambient light sensor. While the M4 provides more horse-power, I wish it would have more than 16 KByte of RAM. Especially as STMicroelectronics has the STM32F3Discovery board with an ARM Cortex M4, 256 KByte of Flash and 48 KByte of RAM for CHF 25.55, compared to the CHF 32.25 for the FRDM-K20D50M? On the other side: there is no Processor Expert for the Discovery Board ;-). I think these days it is the software which makes the difference, not the silicon or the board. Silicon is only sand 😉
I’m happy with what I was able to carry out with the board in a very short time. It is a great addition to my set of boards, especially as it can interface with Arduino (compatible) shields. And I want to run my Zumo with it so I have a little red+black robot :-). That will be a lot of fun: I already have some ideas how to use the temperature and ambient light sensors :mgreen:.
Happy Boarding 🙂
PS: Yes, I had a beautiful and sunny week-end *outside*. Processor Expert enabled me to spend many hours outside with my family. Thank you! Despite the fact that I catched a light sun burn 😉