• AVR Freaks

Helpful ReplyHot!Should I Use Harmony for New Projects?

Page: < 12 Showing page 2 of 2
Author
yp66
Starting Member
  • Total Posts : 28
  • Reward points : 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/11 13:04:08 (permalink)
5 (2)
@cen199, I am somewhat in the same situation as you, in that I have a lot of experience with microcontrollers/CPUs except in my case, I have only been working with PICs for the last few years and have always depended on an automated tool for configuring all the settings and registers.
 
So here is my take; from where I stand, unless I can use an automated tool to configure a PIC, I will simply not use one.  It's not that I can't go through the sheets and figure out all the bits and settings and magic sequences, it's just that I am not willing to put in the time it takes to figure all this out because I can do the same with another CPU without wasting that amount of time (and lose a few cents or dollars in the final price of the product - since they are mostly custom low quantity products, a few bucks here and there don't matter).
 
So far, I have had no issues using MCC for the 8/16 bit PICs but I recently got tempted to use a high speed 32 bit chip as a really really fast but plain (no file system, ethernet) microcontroller and was more or less forced to use Harmony 3 because MCC does not support the part (PIC32MX174256D and also MZs).  In the process, I decided to also use FreeRTOS. My experience to this point has been mixed for Harmony, and extremely good for FreeRTOS, and below are some of my observations:
 
- Installing Harmony 3 was a pain - a lot of downloads, a lot of confusing windows and GUI issues (you hit a button and you think you are done waiting but in reality, you have to hit yet another button etc.)  Eventually, everything loaded up and it works but I dread having to install a different version of it in the future.  I had colleagues install it and they run into similar issues, so it's not just me!
 
- FreeRTOS is a great product and the ability to use it more or less as a drop-in feature is great and makes some of the pain of installing harmony worth it.
 
- Harmony 3 has a lot of small annoying bugs, which I suspect nobody cares to point out because they can easily be by-passed yet they are there and reflect that Harmony is not that mature yet.  As an example, when I hit the 'generate code' button it brings up a dialog box asking if I should save my current configuration, but the default button is "Do not save"; if I hit "Save" it doesn't actually save it - after a while, it's like, whatever ...  Similar issues with configuring the clock, one day I wasted hours with a board not coming up only to realize that after changing some settings on the clock configuration, such changes don't propagate unless you change some other settings which seem to trigger a full re-generation of all detailed parameters.  
 
- For the chips I"ve used, (PIC32MX and a couple of PIC32MZ), Harmony help you get a board up and running quickly and without much fanfare.  Basic peripheral configuration is straightforward (GPIO, clock, A/D, UARTS, Timers etc), and the APIs generally make sense but documentation is spotty.  I find it simpler to just open the header files and see what's there, as most in-code documentation often seems to be more up to date than what is online.  There are a lot of 'tutorials' but they only do the obvious things, things that you don't need a tutorial to accomplish anyway.
 
- Regarding code bloat, I have had no issues but it's not like I am nowhere near filling available resources; in general, though, it seems that if you simply stick to using drivers, the code is pretty small (except the actual source code who has so many empty lines of comments that I find myself deleting a lot of lines just so I can read a paragraph without scrolling across pages and pages of empties).
 
- If what you are trying to accomplish is not provided by default, it is very hard to add it; As an example, I am using an I2C device that requires sequential write/read transactions but without an I2C stop condition and even though I'm not certain yet, I see no way of accomplishing this with the existing device libraries (which read or write, but give no explicit ability to generate the start/stop conditions).
 
At the end of it, if you ask me, would I go the Harmony route again, my answer is yes - despite the annoyances and random bugs, it's still better than going bare metal.  It has a learning curve, but what tool doesn't?  I just hope all the work learning it doesn't go down the drain when the new set of tools comes around.
#21
rbuck
Super Member
  • Total Posts : 354
  • Reward points : 0
  • Joined: 2005/04/28 12:48:11
  • Location: Phoenix, AZ
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/11 20:26:23 (permalink)
5 (5)
Well, I gave up on Harmony a couple of years ago. I wanted to get Ethernet working on a 64K part but the Code Harmony generated was over 64K in size. For anything Ethernet related I now use STM32F407 parts. The application I wanted Harmony to generate I have running in 42K of flash on the STM part.
 
Unless Harmony usage has greatly improved over the last 2 years, I would not be interested in using it. The new STM32CubeIDE is so much slicker than what I remember of Harmony. You setup the peripherals first and do clock generation last. All I have to do is put in the crystal frequency I am using, the CPU clock speed I want to use, and press Enter. Two seconds later all the clock settings for all peripherals is done. Click "Generate Code", let it finish, and then start writing your own code. If Harmony worked that way it would be great. I use Ethernet without an RTOS, but if you want to you can run it with FreeRTOS.
 
I still use PiCs for anything that doesn't require Ethernet. But I don't use MCC. I have been using PICs since 1995 and am just used to reading the data sheets and setting up everything myself. It takes time but I guess that is part of the game. That still applies even for the PIC32 parts that I use. Always read the errata data sheets before attempting to use a new PIC part. I learned that the hard way many years ago.
#22
cen199
Starting Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2014/03/07 10:41:05
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/13 06:34:46 (permalink)
3 (2)
@yp66, Your situation does sound familiar.  Spending a few extra dollars on overkill parts can be better than spending possibly hundreds of extra hours on development. 
 
I understand your position on the automated tools.  I have been using PICs since the 16C series, when assembly was the only choice.  To me, Microchip's datasheets and general hardware concepts feel more familiar than the abstracted tools.  The jump from PIC18 to PIC32 took some learning, but it still felt mostly familiar.
 
I am not against automated setup tools, but the tool should take almost no time to learn.  If a large amount of effort goes into installing or using a code generator, time is better spent just learning to code at a lower level.  An OS is more abstraction than I ever want on these small parts.  
 
@rbuck, I'm with you on this one.  I'll keep reading the datasheets and wait a few years before trying Harmony or MCC again.   
#23
volodymyrearth
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2018/08/30 00:35:27
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/06/07 09:52:51 (permalink)
0
Harmony 3 is very bad thought out. Libraries are poor and useless. It is 4 steps back, it looks like bad student job. 
#24
yyfliu
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2009/01/01 04:40:37
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/09/28 07:20:27 (permalink)
5 (1)
HarmonyV3 temporarily has been developed too bad. When you use the project graph to drag in software modules and generate code. There will be many compile errors due to undefined variables. You don't bellieve?! You may try a USB CDC simple port demo on a PIC32MK device. Whatever well you construct the MHC, the code will generate error. And there is no example code or guide app tasks in your project. Comparing to Harmony V2.06, V3 still has a long way to go. It makes a very negative impression on Microchip's software product.  
#25
laffelt
Super Member
  • Total Posts : 166
  • Reward points : 0
  • Joined: 2008/05/08 18:05:53
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/09/28 13:43:59 (permalink)
0
I am considering moving my high end development away from PIC32MZ and Harmony 2.06 to STM32F parts, STM32CubeIDE and their TouchGFX graphics system. We need higher resolution displays (10") and slicker GUI's for our next generation of controllers, we already do not use the MC graphics library and have moved to the FT810 from FTDI/BridgeTek. If anyone has feedback on going this route and specifically the ST graphics I would greatly appreciate it!
#26
friesen
Super Member
  • Total Posts : 2154
  • Reward points : 0
  • Joined: 2008/05/08 05:23:35
  • Location: Indiana, USA
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/09/28 13:52:07 (permalink)
4 (1)
@laffelt Just to be sure, you do know about https://lvgl.io/ ?
 
Its not that difficult to port.  I use it with a STM32F part.
 
My opinion is that the STM32Cube thing is frustrating in some of the same regards as Harmony, however, it does seem that there aren't nearly as many bugs out of the box.  Also, instead of 8 layers of obfuscation, its 4.  You can pretty much carve the clock init stuff out and write your own code from scratch.

Erik Friesen
#27
laffelt
Super Member
  • Total Posts : 166
  • Reward points : 0
  • Joined: 2008/05/08 18:05:53
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/09/28 14:10:30 (permalink)
0
Erik,
 
Thanks for that link! I will definitely take a hard look at that system, we need to move from 16 bit to 24 bit color with alpha blending, that is why I was looking at the ST graphics system. If LVGL has some way of designing and seeing the screen so it can be exported it might be a great option for us.
 
I'm not too worried about the frustration level in ST, I lived thru Harmony 1.09 up to 3.0, backed off to 2.06
#28
Paul PortSol
Super Member
  • Total Posts : 635
  • Reward points : 0
  • Joined: 2015/07/03 11:52:03
  • Location: Newfoundland, Canada
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/09/29 06:50:26 (permalink)
3 (1)
RS485 on some STM32F missing the DE control and can have timing issues using the software implemented DE. STM32H743 and STM32L496 tested OK for us with RS485.
#29
NKurzman
A Guy on the Net
  • Total Posts : 18984
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/09/29 12:02:43 (permalink)
0
No PICs have really have DE control for RS-485.  At least some of the STM32F have direct DE control with enable and disable delays.
 
#30
friesen
Super Member
  • Total Posts : 2154
  • Reward points : 0
  • Joined: 2008/05/08 05:23:35
  • Location: Indiana, USA
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/09/29 12:14:40 (permalink)
0
@NKurzman Don't most have the capability of using the RTS for DE?  At least it works well enough on the 32MX460F512L.

Erik Friesen
#31
Murton Pike Systems
Senior Member
  • Total Posts : 49
  • Reward points : 0
  • Joined: 2020/09/10 02:13:01
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/09/29 14:00:05 (permalink)
1.33 (3)
Harmony is just like any other complex program, it takes time to get into it.
It takes patience and time.
 
 
post edited by nigelwright7558 - 2020/09/29 14:02:47
#32
NKurzman
A Guy on the Net
  • Total Posts : 18984
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/09/29 15:19:11 (permalink)
0
friesen
@NKurzman Don't most have the capability of using the RTS for DE?  At least it works well enough on the 32MX460F512L.


Does it? I will need to look. is it documented some where.  I am changing interrupt modes to get last byte out so I can disable.
 
STM32F779IIT6 has the feature.
#33
Paul PortSol
Super Member
  • Total Posts : 635
  • Reward points : 0
  • Joined: 2015/07/03 11:52:03
  • Location: Newfoundland, Canada
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/09/30 05:06:43 (permalink)
0
RS485:
PIC32MX and PIC32MZ both have RTS as DE, you just need to add an inverter (or in my case a spare open collector relay driver with pullup). I've had this running reliably in RS485 networks for about 4 years.
 
STM32H743 DE works in our tests.
STM32L476 DE works in our tests.
STM32F413 DE emulation fails in our tests. An extra partial bit time is added before DE is disabled (effectively stretches stop bit), causing a clash with the start bit of other nodes in the network.
 
Paul
#34
NKurzman
A Guy on the Net
  • Total Posts : 18984
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/09/30 10:40:45 (permalink)
0
You need to add in inverter.  WHY??? Microchip does not have one on the die?  It also means there is no way to add a Turn on delay if the Transceiver is slow. It is too late for this project anyway.  I may give it a shot in the Future.  I saw that on a PIC24 in the past. But again the board was already layed out.
 
STM32F779IIT6 has adjustable delays for enable and disable. 
 
#35
Page: < 12 Showing page 2 of 2
Jump to:
© 2020 APG vNext Commercial Version 4.5