Yes, I have been busy with all the different ARM Cortex Mx cores I’m using in my projects. But beside of the ‘ARM domination of the world’, there are other interesting processors out there. While the ARM cores have added DSP (Digital Signal Processing) capabilities blurring the boundaries between pure MCU and DSP processors, there is still a place (or niche?) for specialized DSP processors. The power of such processors is in the domain of fast signal processing, e.g. for intelligent power switches or for advanced motor control.
DSP and/or DSC
For a small project I need a processor to do fast digital signal processing, and because of other priorities this project was alway put on the ‘yet to be done’ stack. For that project I wanted to look at the Freescale 56F8400 DSC (Digital Signal Controller) family. I had ordered a TWR-56F8400 board already a while back. I’m using the open source FreeRTOS operating system in most of my projects, but exactly for the Freescale DSC’s there was no port available :-(.
Been stuck with the specifics of the DSC core, finally with the help of Ricky Ye (an application engineer at Freescale) I have FreeRTOS running on the 56F8400 :-).
The TWR-56F8400 comes with an onboard debugging interface (OSJTAG). By default, the board is set up to be powered through the TWR-ELEV board. It took me a while to read the documentation and to find out that for standalone mode I need to patch the board with a cable:
Because the onboard OSJTAG is not really fast, I switched to use the P&E Universal Multilink which provides higher download and debugging speed:
Processor Expert FreeRTOS Component
To make usage of FreeRTOS simple, I have added the DSC port to the existing FreeRTOS component:
Because the 56F8400 has the watchdog enabled by default, I added a watchdog component so I can disable it out of reset.
The DSC specific settings needed are very small. The only thing needed is to configure the TickCounter (e.g. to 10 ms/100 Hz):
That’s it 🙂
So far the component is working fine. Some points to note:
- The port is for the newer 32bit DSC cores (56F8400). Older 16bit cores (e.g. 56F8257 are not supported/tested yet).
- Unlike other FreeRTOS ports, this port is not using a SWI (Software Interrupt) instruction to switch the context. Instead it is using the function vPortYield() in port.c. This function performs the task switch. This means that the task switches are not super-fast, but I have not had the time to add a better solution.
- Advanced functionality like tickless idle mode has not been tested yet.
Finally I have FreeRTOS for the DSC 56F8400 running :-).With this I have the ability to run a realtime operating system on the DSC core, and best of all: FreeRTOS is free and open source :-). And I can use the same operating system and component for HCS08, HSC12, ColdFire V1/V2, ARM Cortex and now for DSC.
If you want to try it out yourself, here is what you need:
- The Processor Expert port files are published on GitHub.
- The updated Processor Expert components are on GitHub (see this article for how to install it).
- An example project for the TWR-56F8400 is published on GitHub.
- Additionaly, the FreeRTOS port has been published in the FreeRTOS community section.
Happy DSC’ing 🙂
PS: Thanks to Ricky for his help and contribution!