[Solved]Something odd about pin mapping

Please post bugs and enhancements for the STM core here
Post Reply
madman2003
Posts: 3
Joined: Sat May 13, 2017 7:58 am

[Solved]Something odd about pin mapping

Post by madman2003 » Sat May 13, 2017 10:59 am

It seems i cannot use the lower digital pins of an L476 for PWM because it falsely assumes the analog pins should be used instead.

I found this in variant.h:
// Convert an analog pin number Axx to a PinName Pxy
#define analogToPinName(p) ((p < NUM_ANALOG_INPUTS) ? digitalToPinName(p+A0) : digitalToPinName(p))

This function is then used by analogWrite()

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

Re: Something odd about pin mapping

Post by RogerClark » Sat May 13, 2017 9:14 pm

Which core are you using?

STMs official core or @grumpyoldpizza's core

i think they both support that hardware

madman2003
Posts: 3
Joined: Sat May 13, 2017 7:58 am

Re: Something odd about pin mapping

Post by madman2003 » Sun May 14, 2017 9:40 am

I'm using the official core, the 12-05-2017 version.

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

Re: Something odd about pin mapping

Post by RogerClark » Sun May 14, 2017 11:22 am

madman2003 wrote:I'm using the official core, the 12-05-2017 version.
Your best bet is to raise an issue on the L4 repo in GitHub.com/stm32duino

User avatar
GrumpyOldPizza
Posts: 181
Joined: Fri Apr 15, 2016 4:15 pm
Location: Denver, CO

Re: Something odd about pin mapping

Post by GrumpyOldPizza » Sun May 14, 2017 12:50 pm

RogerClark wrote:
madman2003 wrote:I'm using the official core, the 12-05-2017 version.
Your best bet is to raise an issue on the L4 repo in GitHub.com/stm32duino
It's a bug in ST's core. Neither the STM32L476 nor the SAMD core have those issues (nor does Teensy).

- Thomas

fpiSTM
Posts: 192
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: Something odd about pin mapping

Post by fpiSTM » Wed May 17, 2017 8:53 pm

"Issue" has been fixed.

Post Reply