Microcontroller choice - ATSAMD20 or STM32G070 - Page 1
Forum section: electronics / general

author: benSTmax
author_rank: Regular Contributor
timestamp: July 11, 2020, 10:26:28 pm
content: I have an old datalogger design which uses a former Freescale S08 micro.The battery powered datalogger has a GPS module (connected over UART) and a couple of temperature sensors (over I2C). The data from these sensors is recorded in files onto a microSD card which is connected over SPI.The current S08-based design was made back around 2008. I was asked to recommend one of the 2 MCUs above as a replacement for a design overhaul. The new design will pretty much stay the same except for the MCU which will replace the S08 due to multiple reasons (chip costs, tools, development, ...)I am not familiar with the 2 proposed micros. On paper, they both look like a good match for this particular project. (Similar flash and RAM size, same CPU)Are there any pitfalls I should be aware of associated with these 2 micros?

author: ttt
author_rank: Regular Contributor
timestamp: July 11, 2020, 11:56:25 pm
content: It's tomato vs tomato IMO. That said I find I2C notoriously difficult to get up and running on STM32 parts so would probably opt for the ATSAMD20 here. The ATSAMD20 part has QFN versions (which I personally prefer).

author: bingo600
author_rank: Super Contributor
timestamp: July 24, 2020, 12:41:03 pm
content: Start out by downloading the Errata list for both MCU'sSomething in there could be critical for your usage./Bingo

author: ucanel
author_rank: Regular Contributor
timestamp: July 24, 2020, 01:14:08 pm
content: Apart from mcu choise,i tried atmel studio 5 years ago and i do not remember almost anything about it.I was using Microchip Pics at that time,at the same time i also tried ST with CubeMx and Keil,it was so easy and i stick with cubemx and keil.If you have programming background you may easily get used to cube+keil+hal libs.Some years ago microchip bought Atmel, i did not follow what they did about development enviroment for Atmel parts.

author: georges80
author_rank: Frequent Contributor
timestamp: July 24, 2020, 03:08:04 pm
content: I've been using STM32F030C6 part in a couple of designs and they are solid parts (running for 2+ years continuously). Several hundred units deployed and ramping up. Very inexpensive part for what it delivers.Interfaced to peripherals via SPI and I2C and UART and various GPIO and ADC pins. The software tool chain works well from Keil and programming & debugging is nicely supported via a very cheap stlink device over SWD.I find accessing the peripherals quite easy and have no issues with SPI/I2C/UART etc.There is a learning cycle to get familiar with the interrupt structure and peripherals, but there is quite a bit of power/flexibility in what they can do so somewhat complicated. There's plenty of code examples out there to piggy back onto.I'd say that the main criteria in selecting are longevity of the product, stability/availability of the tools and whether investing time to learn a particular platform allows you to leverage that investment in future designs.cheers,george.

author: benSTmax
author_rank: Regular Contributor
timestamp: August 14, 2020, 03:22:26 pm
content: I checked the errata on both parts and the known list of issues for both parts weren't going to affect this project.From the hardware point of view, I couldn't really decide between them both since each one of them had some things which I liked and others which I didn't.The only negative bit I found was the SAMD datasheet which to me feels much worse than the ST counterpart.One of the firmware developers had a go with both parts, trying out some of the peripherals and he had some headaches with the SAMD part. Even though he knew the purpose of synchronization between different clock domains, he concluded the clock domain data exchange synchronization (aka SYNCBUSY bit in most of the SAMD peripherals) will create more problems for some of the firmware developers.In his view, the fact that the firmware developer has to manually take care of this aspect is a major issue and a no-go for SAMD.In the end, the decision was to move forward with the STM32G070 part.