Now the root of the problem is clear. I have wrong definition of the chip so not all of its hardware is working as it should be. So I must create new definition for STM32Duino and put it (some how) to Platfromio...fpiSTM wrote: Fri Dec 27, 2019 3:28 pm Hi,
For analogWrite on PA4 and PA5, this is the normal behaviour as there is no timer linked to those pins:
https://github.com/stm32duino/Arduino_T ... c#L88-L136
So it operates like a digital pin: 0-2047 -> low else high
analogWrite use pin capabilities in this order: DAC if any, PWM if any else digital.
For analogRead on PA6 and PA7 this should work if your variant is well formed:
https://github.com/stm32duino/Arduino_T ... .c#L39-L42
Probably the way you define the PA6 and PA7 does not match te index of PA_6 and PA_7 in the digitalPin array.
Help! Help! Help

PS. It seems that STM32Duino supports "Generic F103R(8-B-C-E)T6" but I don't have this board at my PIO installation.