Skip to content

Not all STM32 Pin names (e.g. PC6,PC8...) are working #54

Closed
@Adminius

Description

@Adminius

i tried to test PWM on 19 pins. with this code:
`int pins[] = {PC6,PC8,PC9,PB8,PB9,PA5,PA6,PA7,PB6,PC7,PA9,PA8,PB10,PB3,PA10,PB11,PB1,PB7,PB0};
//int pins[] = {34, 33, 32, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 3, 2, 39, 41, 22, 49 };

void setup() {

}

void loop() {
for(int i = 0; i<19;i++){
for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 5) {
analogWrite(pins[i], fadeValue);
delay(30);
}
}
for(int i = 0; i<19;i++){
for (int fadeValue = 255 ; fadeValue >= 0; fadeValue -= 5) {
analogWrite(pins[i], fadeValue);
delay(30);
}
}
}`
if i use STM32 style names, not all LEDs are working.
With Arduino names all LEDs are working.

For NUCLEO Morpho connectors it's easier to use STM32 style.

Tested on L476 with 2017.6.2 core.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions