[ell-i-developers] Re: PWM configuration

  • From: Ivan Raul <supra.material@xxxxxxxxx>
  • To: ell-i-developers@xxxxxxxxxxxxx
  • Date: Fri, 24 Jan 2014 18:22:31 +0200

Some advice...

I have two problems. The first is that this function seems to not advance
the *r pointer.
I am not sure if my solution is correct.

Second, it needs to advance only by 16 bits, as the size of the array, is
the size of the total 16 elements, not only the ones we need to write. For
that reason, I modified the initialization procedure of the timer to
include all non - reserved registers, to put them to their reset state, as
this function will write all the values as size of the array. This function
so far is only able to update the first element, but fails for the rest.

void SystemInitData16NoAddress(const SystemInitRecordArray *ra) {
    const SystemInitRecordData16NoAddress *r
        = (const SystemInitRecordData16NoAddress

    register volatile uint16_t *a = ra->init_record_address16;
    for (int i = 0; i < ra->init_record_number; i++) {
        *a = (&r[i])->init_data16;   // Write 16 bits
//        a += 2;                // Advance by 32 bits


With Warm Regards, Ivan Raul

On Fri, Jan 24, 2014 at 5:07 PM, Ivan Raul <supra.material@xxxxxxxxx> wrote:

> I made the pull request, has the previous changes. I hope to have
> something solid to push later today.
> With Warm Regards, Ivan Raul
> On Fri, Jan 24, 2014 at 4:43 PM, Pekka Nikander <pekka.nikander@xxxxxx>wrote:
>> > Pekka: What do you suggest as following step? I was planning first to
>> make the timer configured from initialization records, and then start
>> porting the AF default values to the gpio initialization.
>> Sounds good to me. Also start committing your fixes so that I'll be able
>> to merge them.

Other related posts: