5
votes
Accepted
Drivers in C++ produces bigger assembly
First the question is, why does the class produces bigger assembly?
You just introduced a class! That means you get longer method names (keyword: name mangling), if you're building with such embedded ...
4
votes
Accepted
Custom Memory Allocator - How to find the required alignment for a platform?
malloc is required to return a pointer properly aligned to hold an object of any type. Which means it must be aligned at least as the largest scalar type. Luckily C ...
4
votes
Would writing to same flash address reduce lifespan of MCU
Let's address the x-y problem.
Why do you need to write to the vector table?
For me that's huge red flag, foreseeing getting bricked devices with RMA labels on them. Because the power brown-out during ...
3
votes
Confusion with variable update in microcontroller programming
As pointed out by @EugeneSh, your sprintf line will overflow the msg_int buffer whenever ...
2
votes
Noise reduction algorithm for an AC mains voltage measurement
I am sampling the 50 Hz sine wave at 20 points
Depending whereabouts the first sample lies and the 20th sample lies on the sampled waveform, can produce errors of this magnitude. A much higher ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
c × 1531microcontroller × 577
pic × 322
stm32 × 320
embedded × 220
avr × 198
uart × 110
interrupts × 101
atmega × 86
i2c × 77
programming × 76
arm × 73
arduino × 70
microchip × 70
timer × 60
spi × 55
c++ × 49
adc × 44
msp430 × 42
assembly × 34
pwm × 33
serial × 33
8051 × 31
flash × 29
firmware × 28