The post discusses testing FreeRTOS on different microcontroller architectures: ATmega328P, ATmega4809, SAMD21, Renesas RA4M1, and ESP32-S3. It highlights architectural differences and challenges. Special attention is given to time slicing and the need for modifications in library codes for smooth operation across these models, emphasizing differences in scheduler functionality and usage.
Arduino has long used Atmel (now Microchip) 8-bit AVR architecture microcontrollers. The ATmega328P, ATmega32U4, and ATmega2560 have been discussed here. Arduino no longer is “in bed” with Microchip, but there are two other Microchip microcontrollers used in Arduino boards, the ATmega4809 and the SAMD21. Both of these are favorites of mine. ATmega4809 The ATmega4809 is …
One of the features of most microcontrollers is that they allow easy access to connected peripherals like sensors and actuators. This allows fast, accurate, and inexpensive operation. However some recent Arduino boards use microcontrollers that obfuscate the underlying hardware interfaces. A look into the Arduino Library for these parts show that they are calling vendor …
I thought it would be interesting to compare the speeds of various Arduino boards, from older designs to the newest microcontrollers. I looked at the following: Note that the Nano 33 IoT, the Nano RP2040, and the Uno R4 (WiFi version) all have an ESP32 as a coprocessor for the radio functionality. The Nano ESP32 …
Traditional Arduino boards, like the Uno R3 or Nano, are typically programmed using the Arduino Library functions. These conveniently present most of the microcontroller’s functionality to the hobbyist user. Books like my Far Inside The Arduino and the microcontroller’s documentation show how to access additional functionality not addressed by the Arduino Library. As more advanced …
The DAC (analogWrite to A0 in Arduino Nano 33 IoT, MKR, and Zero boards) isn’t specified to work to the extreme limits. Basically it doesn’t go below 50mV or above 3.25 volts. While the Arduino documentation doesn’t mention this, the datasheet does in section 37.11.5. While the DAC is 10 bits, the analogWrite function reduces …
The Analog to Digital Converter in the SAMD21 is specified to run with a clock frequency from 30 to 2,100 kHz. The Arduino Library configures the ADC clock to be the 48 MHz system clock divided by 256, or 187.5 kHz, or a clock period of 5.33 µs. The conversion time is 7 clock periods, …
The SAMD21 based Arduino boards have a 10 bit DAC, so naturally I wanted to generate a sine wave! Some years ago when I was teaching microcontrollers I had students build a DAC using a resistor ladder. The microcontroller, a 68HCS12, used a timer interrupt to advance the value to the DAC by indexing a …
The ARM-based (SAMD21) Arduino Nano 33 IoT might have been rushed into production based on a somewhat deficient assignment of Timer/Counters to PWM pin functions. Arduino documentation claims 11 PWM pins: D2, D3, D5, D6, D9, D10, D11, D12, A2, A3, and A5. However the following is not documented: This means there are only really …
Today I’m going to revisit the Real Time Counter (RTC) in the SAMD21 microcontroller. When running in real time clock mode (mode 2) a single register holds the date/time value with separate bit fields for year, month, day, hour, and seconds. The value can be printed out with this code: But there are some issues …