Some Background

Welcome to a blog about the new Renesas Synergy platform! I’ll be writing about my journey learning the Synergy platform and post tutorials, code examples, troubles I find and how I got around them.

But first, a little about myself. I’m an Electrical Engineer with a background in both analog design, microcontrollers, and .NET development. I design circuit boards for a living and touch everything from LDO’s, Buck, Boost, and Buck/Boost DC/DC converters, ADC’s, DAC’s, analog signal processing, etc, as well as writing Windows software to interface to the microcontrollers (IE: plot/process data).

Going through school I used the Microchip PIC24/PIC32 microcontrollers extensively, and have also used them in several projects at work. However, a few years ago, Microchip decided to create a new framework called Harmony. They worked on updating their code base so the same set of libraries would work across multiple families of microcontrollers (PIC32MX, PIC32MZ, etc). While doing this, they also decided to stop support for their Peripheral Libraries. Oh, one more bit of icing…The silicon for the MZ had several flaws. Grrr!

I have two problems with this. First, all the experiences I’ve had with Harmony have been very unsettling. Their configurator never worked well for me, the library API didn’t seem very intuitive, and in general, made developing for PIC’s much more difficult.

Second, my company has hundreds of hours invested in a code base that uses the Peripheral Libraries. While they aren’t perfect, well, OK, they have more bugs than a cheap hotel bed, the bugs were well known and you could work around them fairly easily.

In order to use their latest compilers, you HAVE to use their Harmony framework. No Peripheral Library support, A.K.A. rewrite all your existing code into a framework that is difficult to learn, hard to navigate, and had its own set of problems.

Finally, I said screw this, bye bye Microchip. (A quick note, I haven’t tried using the Harmony framework for about a year, so it’s possible that many of my issues have been resolved).

I also quickly realized that the code we wrote for the PIC32 could not be easily transferred to a new microcontroller if needed. Now, a lot of this is due to how we organized our code (IE: we could have abstracted out the library calls and put processing code in their own files, but we didn’t, so we can’t really switch vendors).

On top of this, there is only one company making PIC’s. If they ever stopped their product line (very unlikely I know), we’d also be screwed.

So began the quest to move to an ARM based microcontroller.

I started evaluating several vendors (TI, Freescale/NXP, Atmel) and in each case found something critical lacking.

TI has CodeComposer, Freescale/NXP has CodeWarrior. I couldn’t stand either IDE.

Atmel has an IDE based on Visual Studio (I LOVE Visual Studio!). I tried getting their latest dev board based on a Cortex-M7. But the IDE didn’t have support for the board. I also found it difficult to navigate, get hardware working, and so on. OK, scratch those guys I guess.

I then started looking into Renesas, the largest microcontroller manufacturer that no one has ever heard of before (unless you’re in automotive or in Japan). Their RX series looked very capable, at least as good of a hardware set as the PIC32MZ should have been. But it’s the same situation as the PIC32’s, single vendor with propitiatory hardware.

Then I discovered that Renesas was developing a new Cortex-M based product line, with the promise that their libraries would be “qualified and supported”. This means the libraries should work great and that if there is a bug, they will fix it ASAP.

October comes and I can’t get to their kick off developers conference. Then work gets REALLY busy. But in February, things start slowing down enough that I can give the platform a hard look (and also give them a bit to work out any big kinks).

So, I’ve purchased a DK-S7G2 and SK-S7G2, time to play!

Right off the bad, I find there is no example code out there, at all. There are full sample applications, but nothing like “Here’s the bare bones that you will need to get IO port to do something).

DuckDuckGo (and Google) consistently come up with no results when searching for API functions (trying searching for counterGet, the basic function to get the counter value of a timer). NOTHING!

So, after a few hours of playing around, and getting the LED’s to blink at a specific rate, I decided to start this blog to document my journey and hopefully help out others out there that are in the same boat as me. Mainly, looking for simple project samples that has the bare basics on a peripheral base.

As I go though the features of the DK and SK, I’ll continue to blog about the process and throw up sample code as much as I can. I’ll also document many of the wrong paths I take, my thought process (when I can remember!) and the ultimate final solution.

One last note before you start reading the tutorials, I am not a Synergy expert! There will be many cases where the path I’ve chosen is not the best path. If you see a better way, please comment!

Happy Reading!!

 

Eric

Advertisements