[Libmaple] pinMode() disables timer even if no PWM mode involved

LibMaple (The core that Roger's repo uses)
User avatar
RogerClark
Posts: 7178
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: pinMode() disables timer even if no PWM mode involved

Post by RogerClark » Mon Jul 31, 2017 4:05 am

Do we have a decision on this ?

victor_pv
Posts: 1681
Joined: Mon Apr 27, 2015 12:12 pm

Re: pinMode() disables timer even if no PWM mode involved

Post by victor_pv » Mon Jul 31, 2017 1:00 pm

edogaldo wrote:
Fri May 26, 2017 7:41 am
stevestrong wrote:edogaldo, can you please detail which things exactly get broken with this PR?
Hi Steve, I'm in doubt with this part:

Code: Select all

        } else {  // disable channel output in non pwm-Mode             
            timer_cc_disable(PIN_MAP[pin].timer_device,
                            PIN_MAP[pin].timer_channel);
        }
A question as I'm not that expert with timers: can't we have any valid combination (also in a possible future variant) in which 2 pins can map to the same couple {timer, channel}?
Roger, I think we haven't gone past this.

Edogaldo, to answer this question, it is not possible to have 2 different pins output the same timer&channel at the same time as far as I can remember.

stevestrong
Posts: 1748
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: pinMode() disables timer even if no PWM mode involved

Post by stevestrong » Mon Jul 31, 2017 1:08 pm

I don't know any application which would get broken by this commit.
If in the future some problem arise, then we could still analyze the situation and, if necessary, revert it.

So I am in favor of this commit.

User avatar
RogerClark
Posts: 7178
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: pinMode() disables timer even if no PWM mode involved

Post by RogerClark » Mon Jul 31, 2017 9:27 pm

I will need to check if the PR got updated, as I thought someone posted an improvement to the PR.

( but perhaps the improvement didnt work)

victor_pv
Posts: 1681
Joined: Mon Apr 27, 2015 12:12 pm

Re: pinMode() disables timer even if no PWM mode involved

Post by victor_pv » Mon Aug 21, 2017 5:03 pm

This thread seems to be focused on the libmaple based core, so I am moving it to that forums.

User avatar
RogerClark
Posts: 7178
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: [Libmaple] pinMode() disables timer even if no PWM mode involved

Post by RogerClark » Mon Aug 21, 2017 9:10 pm

We probably need a LibMaple Core section. I will log in as super admin and create it

Post Reply