You are reading a single comment by @asez73 and its replies. Click here to read the full conversation.
  • Hello Rob,

    Are getting the kind of output below?

    >reset();
    =undefined
     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v72 Copyright 2014 G.Williams
    >analogWrite(B12,0.5);
    =undefined
    >analogWrite(B15,0.5);
    ERROR: Pin B15 is not capable of PWM Output
    Suitable pins are:
    A0 A1 A2 A3 A5 A6 A7 A8 A9
    A10 A11 A15 B0 B1 B3 B4 B5 B6
    B7 B8 B9 B10 B12 B13 B14 C6 C7
    C8 C9
    Or pins with DAC output are:
    =undefined
    >analogWrite(B15,0.5,{freq: 5});
    ERROR: Pin B15 is not capable of PWM Output
    Suitable pins are:
    A0 A1 A2 A3 A5 A6 A7 A8 A9
    A10 A11 A15 B0 B1 B3 B4 B5 B6
    B7 B8 B9 B10 B12 B13 B14 C6 C7
    C8 C9
    Or pins with DAC output are:
    =undefined
    > 
    

    Meanwhile for B12 this code doesn't show any thing special about it.
    However the doc doesn't show B12 as a PWM capable pin.
    I did not wired anything to it so far.
    Do you have an element/clue about what doesn't work with B12?

    >analogWrite(B12, 0.5, { freq : 5 });
    =undefined
    >
    

    Clearly, the specs of STM32F401RE shows that it should work with B15 pin, it's not a matter of hardware.

    Actually, Espruino's doc page you mentioned is right. The utilities that generated it are correctly using the pins definitions which are themselves correct too.

    However, there seem to be a problem in the source/compiled version of Espruino itself.
    To be investigated further I think.

About

Avatar for asez73 @asez73 started