ClickBeetle Model-Train Controller

Looking back to the magic N-track train I was searching for something bigger but using the same firmware with advanced features. I decided to keep the ClickBeetle standard to add more boards offering to possibility to build a flexible HMI.      The base board called HmiBeetle is capable to add up to 5 ClickBeetle boards … [Read more…]

Using Interrupts with ARM Cortex M (with Ambiq Micro Apollo MCU software example)

The interrupt part of ARM Cortex M MCUs is described in CMSIS. The interrupt controller of ARM Cortex M MCUs is called NVIC. The NVIC is part of CMSIS and is decribed at the CMSIS website: https://www.keil.com/pack/doc/CMSIS/Core/html/group__NVIC__gr.html In general ARM Cortex M based MCUs having two types of IRQs: Core peripheral IRQs and MCU peripheral … [Read more…]

Using Ambiq Micro Apollo1 or Apollo2 MCUs CTIMER as PWM

A Pulse Width Modelation (PWM) has a duty and a cycle. The duty can be something between 0% and 100% of the cycle time. For Ambiq Micro the CTIMER peripheral can be used to generate a PWM. GPIO setup First of all the GPIOs have to be set, see also Using GPIOs for more details. The … [Read more…]

Using GPIOs of Ambiq Micros Apollo1 and Apollo2 MCUs

The GPIOs of Apollo1 and Apollo2 series MCUs can be configured via a MUX for up to 8 different functionalities. Following schematic can be found in the datasheet in the chapter GPIO and Pad Configuration Module (Apollo1: chapter 6, Apollo2: chapter 7): The IO-cell itself can be configured in a complex way. The datasheet is … [Read more…]

The Ambiq Micro Apollo 2 SystemTimer (SysTimer)

A new feature of the new Apollo 2 MCU series is the so called SystemTimer. The SystemTimer or SysTimer is not the SysTick timer of the ARM Cortex M core, but adds new possibilities for real time behaviour scheduling in hardware with a little part of software. In addition it runs also in deepsleep modes! … [Read more…]