Category Archives: Uncategorized

An STM32 Arduino IDE Button Debouncing Framework

What follows is a very basic framework for button debouncing. It works on an STM32 and is demonstrated in the following code on an STM32F446RE Nucleo board running at the default 84MHz. It uses timer #2 (TIM2), but could be … Continue reading

Posted in Uncategorized | Leave a comment

Arduino stdlib Library Replacement

Excludes memory allocation functions. Compiled from various sources. Just because. ctype_.h stdio_.h stdlib_.h stdlib_.c

Posted in Uncategorized | Leave a comment

Arduino Inline Assembly string Library

This is a refactoring of the existing Arduino (avr) C string library. This was simply an academic exercise. This code should compile to the same size, since in most respects it is the same code. The majority of the comments … Continue reading

Posted in Uncategorized | Leave a comment

STM32F446RE Nucleo RTC Timestamp

This program demonstrates the RTC timestamp feature of the STM32F4 family of MCUs. The timestamp is activated by one of two external pins (PA0 or PC13 on the STM32F446). Since the PC13 pin is connected to the user button on … Continue reading

Posted in Uncategorized | Leave a comment

STM32F405 Feather GPS Logger

Demonstrates UART/DMA Rx, FreeRTOS, specific sentence selection and SD Card logging. Compiled with STMicroelectronics core using the Arduino IDE. Note, all references to “Serial” in the STM32 SD library SD.cpp file were commented out since this program is not using … Continue reading

Posted in Uncategorized | Leave a comment

Receiving Data of Indeterminate Length via STM32F4 UART DMA

Adafruit STM32F405 Feather Demonstration For applications where you don’t know the length of a data stream prior to receiving it via DMA UART. Uses Arduino IDE with STMicroelectronics 2.0 core. Here is a picture of the Adafruit STM32F405 Feather connected … Continue reading

Posted in Uncategorized | Leave a comment

DMA in the IDE, Part V

DMA UART M2P Register-Level Programming In the final post on STM32 DMA programming in the Arduino IDE, we will examine register-level setup of the peripherals. The demo program here is a simple refactoring of a previous program that utilizes DMA … Continue reading

Posted in Uncategorized | Leave a comment

DMA in the IDE, Part IV

STM32 DMA ADC P2M Demo This is the fourth example of DMA usage on the STM32F405 Feather board. Programming is from the Arduino IDE. This example demonstrates the peripheral to memory (P2M) DMA Mode. We send data from the ADC … Continue reading

Posted in Uncategorized | Leave a comment

DMA in the IDE, Part III

STM32 DMA UART Transmit M2P Demo This is the third example of DMA usage on the STM32F405 Feather board. Programming is via the Arduino IDE. This example demonstrates the memory to peripheral (M2P) DMA Mode. We send data from memory … Continue reading

Posted in Uncategorized | Leave a comment

DMA in the IDE, Part II

STM32 DMA UART Receive P2M Demo This is the second example of DMA usage on the STM32F405 Feather board. Programming is from the Arduino IDE. This example demonstrates the peripheral to memory (P2M) DMA Mode. We send serial data to … Continue reading

Posted in Uncategorized | Leave a comment