Skip to content

RS485 enablePin not working on STM32 #32

@walle86

Description

@walle86

Hi, i had the Problem that the enablePin didn't work in my Project. After checking the source code i found out that the typdef is set to int8_t for this pin. All Pins with Analog functions (e.g. PA0 to PA7, PB0, PB1 on an STM32F103C8) are offset to 0xC0 (PNUM_ANALOG_BASE 0xC0). Because of the overflow of int8_t the value was less than 0 an the enablePinwasn't recognized. Changing typdef of enablePin to int16_t solved the Problem.

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