Afuevu
Afuevu
DIIDevHeads IoT Integration Server
Created by Afuevu on 12/20/2024 in #firmware-and-baremetal
How to Optimize Energy Calculations for STM32 Energy Meter Without Overloading Interrupts?
Hello everyone, Good day. I have been able to make the adjustment @ZacckOsiemo and @Marvee Amasi suggested that I moved the calculations from the interrupt to the while loop and just used flags to do the checks in the ISR. I have made a commit on the repo, here is the link https://github.com/DevHeadsCommunity/AC_CURRENT_MEASUREMENT/tree/master. I intend to save data on the EEPROM every 8 hours and 24 hours. I am considering using the internal RTC of the stm32 or a counter that keeps incrementing once the system turns on. What are our thoughts, have anyone used the internal RTC of the stm32f103c8t6 before?
23 replies