embedded - What is the logic behind the radiotimer_start() C function? -
lines 50 - 69 in radiotimer.c represent function called "radiotimer_start()".
this function, if understand correctly, written msp430 x26x hardware.
at abstract level, function starts timer (i believe) executes periodically (the parameter passed in). not able understand @ how works.
i wondering if 1 of experts community please explain me going on in each line of function.
for example on line 61:
tacctl2 = cap+scs+ccis1+cm_1;
why adding many values, , "capture mode"?
to honest entire function means nothing me.
i appreciate if 1 of experts community @ least shed light on how figure out of these lines of code doing, , possibly relate how timer started.
that register setting bunch of bits in it. + or in case. statement can rewritten as:
tacctl2 = cap | scs | ccis1 | cm_1;
the info each #define (cap, scs, ccis1, , cm_1) should in libraries using. bits set shown on page 372 of doc linked.
cm_1 example indicates capturing on rising edge.
Comments
Post a Comment