r/cprogramming • • Jun 23 '26

Are These C Concepts Enough to Start Learning Embedded Programming?

Hi everyone.

I recently wanted to get into embedded programming.

I have basic C programming knowledge and after researching about it i have made a list of concepts I must learn thoroughly.

I also used chatgpt to get these concepts so idk if it's enough or if everything in there is accurate and essential.

core c :

data types,

integer promotion and type conversions,

operators and precedence,

control flow,

functions,

storage classes,

scope and lifetime

memory and pointers :

memory model,

stack vs heap,

arrays,

strings,

pointers,

pointer arithmetic,

void pointers,

function pointers,

dynamic memory allocation (malloc, calloc, realloc, free)

user-defined types :

structures,

nested structures,

unions,

bit fields,

enums,

typedef

qualifiers :

const,

static,

volatile,

restrict

bit manipulation :

bitwise operations,

memory alignment,

padding,

endianness

preprocessor and project organization :

header files,

preprocessor,

macros,

conditional compilation,

inline functions,

separate compilation,

linking

low-level programming :

memory-mapped i/o,

register manipulation,

interrupt basics

language behavior :

undefined behavior,

implementation-defined behavior.

I would like to know if I am missing anything or is this enough and would appreciate it if u shared any tips to learn these topics.

Btw I am currently using a book called C programming: A modern approach , to learn these topics and the list I have provided above is based on the topics of this book

21 Upvotes

25 comments sorted by

View all comments

Show parent comment

2

u/HarderFasterHarder Jun 24 '26

Definitely once you get more into things... Spent a long time debugging bad measurements until I finally read the errata way to late. Turns out the sampling capacitor had a slow leak to Vcc due to a defect in the silicon and since we had an unfortunately high impedance on the analog signal, the error was bad. Like 10-20% off bad. But with that, I was able to correlate the measurement error to the time between samples and confirmed that was our problem. Solution was to elongate the sample time to allow for the cap voltage to stabilize before making the measurement.

3

u/dmills_00 Jun 24 '26

High Z into an unbuffered S/H or switched cap converter is one of the things on my schematic review checklist, been there too often.

2

u/HarderFasterHarder Jun 24 '26

It made our list after that too... I printed copies of the impedance to sample time table from ST's data sheet and passed it out to the EE's😅

Wish I could say that was the last discussion about it... But have to nix designs still due to kiloohm source impedances meant for high speed measurements... Oh well, at least someone is paying attention 🤷‍♀️

1

u/flatfinger Jun 24 '26

I wish chips would have options to precharge the sampling cap to Vdd or Vss (selectable). In many scenarios, this would lead to a difference between the measured and actual voltage, but precharging to a known level would yield more consistent behavior than having an arbitrary voltage on the input cap.

1

u/HarderFasterHarder Jun 24 '26

Ya, that whole experience was super frustrating at the time, but I learned a hell of a lot about ADCs and measurement strategies.

The STM32 let's you pick super short to absurdly long sample times... Which I realized meant I could just leave the sucker open as long as I wanted to let the thing charge up completely. It was measuring the inductor current in a 2 channel avg current control buck converter, and I had a single ADC peripheral dedicated to those two current measurements so I had no real problem with longer sample times as the samples were 180° offset... Lucky😅

Also was really cool, because I could see the exact moment the ADC opened the gate because we saw a little bitty spike on the analog signal from the sample cap discharging... Made trigger timing verification really obvious at least😜