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

  • From: Ivan Raul <supra.material@xxxxxxxxx>
  • To: ell-i-developers@xxxxxxxxxxxxx
  • Date: Tue, 28 Jan 2014 19:02:37 +0200

Dear All.

I have created the pull request for the initial fix to the initialization.
I have tested the system with those specific changes.

To really make the PWM work, still the GPIO alternate functions need to be
initialized, do I work on that in parallel with the Serial testing?

With Warm Regards, Ivan Raul


On Mon, Jan 27, 2014 at 11:35 PM, Pekka Nikander <pekka.nikander@xxxxxx>wrote:

> >> 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.
> >>
>
> > I already fixed the space issue, with the size of the uint32_t and the
> indexes.
> > From the part that doesn't need typecast you are right, and changing the
> pointer address is done.
> >
> > Now that this is solved, what would be the next step?
>
> Please test once more tomorrow the cleaned up code, and create a pull
> request.
>
> After that, you can start testing the Serial code.  You will again learn
> more, as this time you'll enter to the wonders of C++ and C++11.  I haven't
> even checked whether the compiler really optimises the const objects away,
> so more assembler reading.  If there are any non-compile-time C++
> constructors left, then we need to optimise more the C++ so that the
> compiler does the right thing and optimises those away.
>
> --Pekka
>
>
>

Other related posts: