Category Archives: Uncategorized

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 from 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

DMA in the IDE

Blinking an LED with STM32 DMA M2M Mode The following program is for the Adafruit STM32F405 Feather board. It is a simple demonstration of using DMA to blink the onboard LED. DMA seemed very mysterious and complicated to me, until … Continue reading

Posted in Uncategorized | Leave a comment

Adafruit STM32F411 BlackPill and STM32F405 Feather Development Boards

STM32F405 Feather Description The STM32F405 Feather that Adafruit designed runs at 168MHz. It has a STEMMA QT/Qwiic port on it so you can easily plug and play I2C sensors. It is usable with the Arduino IDE or STM32Cube IDE. This … Continue reading

Posted in Uncategorized | Leave a comment

Arduino Inline Assembly Tutorial (Tables)

Often, the fastest way to compute something on an arduino is to not compute it all. Huh? For example, trigonometric functions are costly operations and can abruptly slow your application to the pace of a crawl. And many times, the … Continue reading

Posted in Uncategorized | Tagged , , , , , | 6 Comments

Arduino Inline Assembly Tutorial (Strings)

Addressing Modes When loading and storing data, there are several addressing methods available for use. The arduino’s AVR microcontroller supports 13 address modes for accessing the Program memory (Flash) and Data memory (SRAM, Register file, I/O Memory, and Extended I/O … Continue reading

Posted in Uncategorized | Tagged , , , , , | Leave a comment

Arduino Inline Assembly Tutorial (Branching)

Loop and Branch Branching is a fundamental feature of computers. For example, branching allows a computer to repeat instruction sequences. One of the most  basic forms of repetition is a “loop”, and the loop is probably the most widely used … Continue reading

Posted in Uncategorized | Tagged , , , , , | 2 Comments

Towards a More General digitalRead

The arduino digitalRead function is a nice bit of code. However, it takes more than a cursory glance to determine exactly how it performs (see Yak Shaving). It also compiles into approximately 222 bytes of code, and its slow in … Continue reading

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

Arduino Inline Assembly Tutorial (Math)

Increment, Decrement, Add and Subtract INC is a mnemonic for INCrement. INC adds one to the contents of the register placing the result back into the register. The C flag in the Status Register (SREG) is not affected by the … Continue reading

Posted in Uncategorized | Tagged , , , , , | Leave a comment