IoT Controllers Karel Slavicek Vaclav Oujezsky 2024 Structure of an IoT System Structure of an IoT System Outline ● Common internal structures ● Overview of main architecture types ● Key hardware manufacturers and product lines ● IDE MCUs and Singleboard Computers ● No strict definition and no ambition to create it ● MCU – bare metal programming ● Singleboard computer – operating system ● No sharp border Hardware design ● MCU (Microcontrollers) ● Small, compact, all-in-one ● Suitable for home-made hardware design ● Simple construction ● Microprocessors – commonly use external RAM memory ● Complex hardware design ● Many-layered PCB ● Higher clock frequency and higher performance MCU internal structure ● Von Neumann architecture ● Memory shared for instructions and data ● Haward architecture ● Separate memory for instructions and data PIC MCU - A bit of history ● PIC microcontrollers ● Peripheral Interface Controller ● Originally developed by General Instrument as PIC1650 ● Intended to be used with the General Instrument CP1600, the first commercially available single-chip 16-bit microprocessor. ● A pioneer among MCUs for IoT ● Today a bit obsoleted but still used ● Reach history (since 1976) PIC ● Commonly in DIL type packages, new types also in SOIC and SSOP ● Extremely small amount of RAM (in some models tens of Bytes) ● EEPROM / Flash ● Timers, PWM, ADC ● Constant interrupt response time ● FreeRTOS on PIC18, 24, 32 and dsPIC PIC ● Harward architecture ● Typically 35 or 70 instructions only ● 12, 14 or 16 bit word ● Small number of instructions ● Commonly 8-bit data bus ● Huge number of types ● http://www.microchip.com/maps/microcontroller.aspx ● Programming: ● PICkit 3 ● GND + VDD, MCLR, ICSPCLK, ICSPDAT ● MPLAB vs. IDE ● MPLAB is assembler oriented, now C ● https://www.microchip.com/en-us/tools-resources/develop/ mplab-x-ide PIC12 ● Together with PIC10 smallest PIC modules ● 8-pin PDIP / SOI8 package ● PIC12F1572-I/SN (~1.2EUR) ● 2x 8-bit timer, 1x 16-bit timer, 3x 16-bit PWM with independent timers ● 3,5kB FLASH, 256B SRAM ● 10-bit ADC ● PIC12F510-I/P (~2EUR) ● 2006 ● 8-bit timer/counter ● 8-bit ADC ● Flash 1024 words, SRAM 38B ● < 170 μA @ 2V, 4 MHz PIC16 ● Midrange PIC, smoothly replaced by PIC18 ● Example: PIC16C58B-04/P (~2EUR) ● 2048 12-bit word flash, 73B RAM ● 18-pin PDIP ● < 2 mA typical @ 5V, 4 Mhz / 15 μ A typical @ 3V, 32 kHz ● 8-bit timer ● For logical operations mainly ● 1998 PIC18 ● High-end PICmodules ● Most popular PIC today ● PIC18F1220-I/P (~4EUR) ● 2kB Flash, 256B RAM ● 7x10bit A/D, 1x10bit PWM, 3x16bit+1x8bit Timers ● 18-pin PDIP ● PIC-MINI-WEB ● PIC18F25J10 ● OLIMEX ● ~16EUR ● 32KB Flash 1K RAM Contemporary MCUs ● Architectures ● ARM ● RISC-V ● Proprietary ● Manufacturers ● Main players ● Low performance MCUs ● Part of other equipments MCU general structure ARM Architecture ● ARM = Advanced RISC Machines, originally Acorn RISC Machine ● Family of RISC instruction set architectures (ISAs) ● In 1990, Advanced RISC Machines Ltd. As spin-off of Acorn → Arm Holdings plc ● Apple–ARM cooperation → ARM6 (1992) ● Advanced High-performance Bus (AHB) introduced in Advanced Microcontroller Bus Architecture (AMBA) version 2 published by Arm Ltd company. ( large bus-widths (64 up to 1024 bits). ● Now: https://www.arm.com architecture design and licence sale ARM (Acorn RISC Machine) ● 32-bit architecture ● 3 main brabches: ● ARM Cortex-A ● ARM Cortex-R ● ARM Cortex-M ● ARM Cortex-X allows more custom based modifications ARM ● Architecture vs. Core ● Architecture e.g. ARMv7 is an ISA (Instruction Set Architecture) ● Core e.g. Cortex M3 implements ISA ARM architecture ● Up to ARMv6 – history ● ARMv6M –> ARM Cortex M0, M0+ ● ARMv7M –> ARM Cortex M3 ● ARMv7E-M –> ARM Cortex M4, M7 ● ARMv8M –> ARM Cortex M23, M33 ● ARMv9 –> on the road ARM Cortex M based MCUs ● 2004 Cortex-M3 ● 2007 Cortex-M1 ● 2009 Cortex-M0 ● 2010 Cortex-M4 ● 2012 Cortex-M0+ ● 2014 Cortex-M7 ● 2016 Cortex-M23 ● 2016 Cortex-M33 ● 2018 Cortex-M35P ● 2020 Cortex-M55 ● 2022 Cortex-M85 ARM architecture ● Processor ● Memory controller ● AHB (Advanced High-performance Bus) ● APB (Advanced Peripheral Bus) ● Peripherals ARM architecture Timers Internal clock ARM MCU manufacturers ● ST Microelectronics ● Silicon Labs ● NXP ● Renesas ● Microchip ● Texas Instruments ● Many others ST Microelectronics ● Focused on mainstream and high performance MCUs ● Reach set of interfaces ● Reach set of modules ● Nucleo evalboards Silicon Labs ● Many wireless chips based on ARM ● EFM series – MCU ● EFR series – radio interface (BT or sub-Ghz) ● Gecko as mascot Silicon Labs ● Zero Gecko, Happy Gecko – ARM Cortex-M0+ ● Tiny Gecko, Leopard Gecko, Jade Gecko – ARM Cortex- M3 ● Pearl Gecko, Wonder Gecko – ARM Cortex-M4 ● EFM32PG22, EFM32PG23, EFM32PG28 – ARM Cortex- M33 RISC-V ● Open standard instruction set architecture (ISA) based on RISC principles. ● Beginning 2010 at the University of California, Berkeley ● Transferred to the RISC-V Foundation in 2015 → RISC-V International - Swiss non-profit entity since November 2019 ● RISC-V instruction set architecture (ISA) are offered under a Creative Commons license or a BSD License. ● Mainline support for RISC-V added to the Linux 5.17 kernel, in 2022. ● https://riscv.org/ RISC-V ● 32-bit and 64-bit address space variants, 128-bit still under development ● Dual core, straightforward internal structure ● ISA base + extensions (adding more instructions) ● Practical implementaions still rare, the most know is Espressif ESP32-C3 RISC-V internal architecture Espressif ● RISC-V architecture ● Oriented to wireless – WiFi and BT ● Two main series: ● ESP32 – ESP32-S2, ESP32-S3, ESP32-C2, ESP32-C3, ESP32- C6 ● ESP8266 → ESP32-C2 Proprietary MCUs ● Microchip ● Texas Instruments ● Renesas ● Espressif ATMEL AVR microcontrolers ● ATMEL AVR serie microcontrollers ● Nordic VLSI (now Nordic Semiconductor) ● 2016 acquired by Michrochip ● ATtiny ● ATmega ● ATXMega ATmega ● Atmega 168 ● Atmega 328 ● Atmega 2560 ● Atmega 32U4 ATtiny ● Attiny 24/44/84 ● Attiny 85 ● Attiny 1604 ● Serie0 / Serie1 ● UPDI ATtiny ● 1999 ATtiny11, ATtiny11L, ATtiny12, ATtiny12L, ATtiny12V, ATtiny22, ATtiny22L ● 2002 ATtiny15L, ATtiny26, ATtiny26L, ATtiny28L, ATtiny28V ● 2003 ATtiny13, ATtiny13V, ATtiny2313, ATtiny2313V, ATtiny4313 ● 2005 ATtiny24, ATtiny24V, ATtiny25, ATtiny25V, ATtiny44, ATtiny44V, ATtiny45, ATtiny45V, ATtiny84, ATtiny84V, ATtiny85, ATtiny85V ● 2006 ATtiny261, ATtiny461, ATtiny861 ● 2008 ATtiny13A, ATtiny24A, ATtiny44A, ATtiny48, ATtiny84A, ATtiny88 ● 2009 ATtiny4, ATtiny5, ATtiny9, ATtiny10, ATtiny43U, ATtiny261A, ATtiny461A, ATtiny861A, ATtiny2313A ● 2010 ATtiny20, ATtiny40, ATtiny87, ATtiny167 ● 2011 ATtiny1634 ● 2012 ATtiny441, ATtiny841, ATtiny828 ● 2016 ATtiny102(F), ATtiny104(F), ATtiny417, ATtiny817 ● 2017 ATtiny212, ATtiny412, ATtiny214, ATtiny414, ATtiny814, ATtiny416, ATtiny816 ● 2018 ATtiny202, ATtiny402, ATtiny204, ATtiny404, ATtiny804, ATtiny1604, ATtiny406, ATtiny806, ATtiny1606, ATtiny807, ATtiny1607, ATtiny1614, ATtiny1616, ATtiny3216, ATtiny1617, ATtiny3217 ● 2020 ATtiny1624, ATtiny1626, ATtiny1627 ● 2021 ATtiny424, ATtiny824, ATtiny426, ATtiny826, ATtiny427, ATtiny827 Texas Instruments ● MSP430 ● 16-bit ● Mixed signal ● Low power consumption ● Long history - MSP430-F2xxx, F5xxx, F6xxx ● Memory size and procesing performance comparable to Atmel MSP430 MSP430 ● Several hundreds MCU types ● IDE: formerly Energie, Now CCS (Code Composer Studio) ● For our lab: under design Linux based MCUs ● Raspberry Pi ● OrangePi ● BananaPi ● NanoPi ● RockPi ● Odroid ● Lantronix ● Gumstix ● Calao systems ● Compulab Linux based MCUs ● Mostly based on ARM Cortex-A architecture ● NXP ● Broadcom ● RockChip ● TI (OMAP serie) ● XScale PXA processors ● Marwell Related technology ● DSP ● PLD → FPGA ● Wireless chips using ARM architecture Concluding remarks ● Harware-software co-design ● Hardwade and software developers cooperate ● Computing power ● RAM and flash size ● Number of pins and spectra of interfaces ● Mechanical dimensions ● Power consumption Concluding remarks ● Endless spectra of MCUs suitable for IoT ● Only very few of them in our lab ● Some other available upon request Thank you for your attention! Questions and comments?