[ell-i-developers] Re: PWM working for TIM2

  • From: Pekka Nikander <pekka.nikander@xxxxxx>
  • To: ell-i-developers@xxxxxxxxxxxxx
  • Date: Mon, 27 Jan 2014 22:24:44 +0200

> Ready, you can see the changes now.
> 
> https://github.com/supramaterial/Runtime/commit/c8dba3605bd990f5368be3726a08211a9bd4aec0#diff-6842398ca2000c00cc73ad9e6e17c7d8L60

Nice but far too complicated fix.  The essential things were changing the type 
of a to a 32-bit pointer instead of being a 16-bit pointer, as you had 
observed, and fixing the D16 macro to compute the right index.

In your current code you actually store 32 bits for each 16 bits value, and 
then don't use the upper 16 zeroes at all.

--Pekka


Other related posts: