Tag Archives: interrupt

STM32F411 RC Calibration Using a DS3231 TCXO 1HZ Signal

STM32 RC oscillator frequency varies from one chip to another due to manufacturing process variations. ST claim each device is factory calibrated for 1% accuracy at 25°C. Thus, after reset this factory calibration value is loaded in the HSICAL[7:0] bits … Continue reading

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

STM32F411 Nucleo I2C DS3231 1Hz Square Wave with External Interrupt

Bare metal like. A very basic demonstration of STM32 I2C communications with a DS3231 chip (in the form of a ChronoDot). The program uses I2C to communicate with the DS3231 chip. It sets the DS3231 date and time, and commands … Continue reading

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

Arduino Stack Painting

The stack is a data structure which operates in a last-in-first-out (LIFO) method. In a LIFO data structure, the last element added to the structure must be the first one to be removed. It is typical to visualize a stack … Continue reading

Posted in Uncategorized | Tagged , , , , | 1 Comment

Not Reading an AVR Bootloader From the Application Section

See this post first. The reason my program fails is because interrupts are disable inside the BLS. Running interrupts in the BLS requires a different lock bit setting than the standard arduino. The arduino boot loader doesn’t use any interrupts, … Continue reading

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

Reading an AVR Bootloader From the Application Section

What follows is a brilliant hack, created by Julians Kidmore (aka Snial), the talented mind behind the Fignition project. His ingenious hack, called BootJacker, is documented on his blog, OneWeekWonder. I can’t begin to explain his algorithm as well as … Continue reading

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

Cascading Timers to Create a Long Delay

Here is a demonstration program that runs on an Arduino which creates a 1 minute long delay by cascading timers. The procedure is outlined in Atmel Application Note AVR133. I’ve set timer #1 up to toggle the OCR1A pin (D9) … Continue reading

Posted in Uncategorized | Tagged , , , , , , | 4 Comments

Nested Interrupts

Normally, the AVR hardware clears the global interrupt flag (in SREG) before entering an interrupt. This means other interrupts are disabled inside the running handler until the handler finishes and exits. The RETI instruction is the normal function epilogue for … Continue reading

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