You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I an confused about the pinutils.findpin section, what it is need for?

    It's not that useful on nRF52 as I2C/SPI/Serial can be on any bit - mainly it was there for STM32.
    The bits you need are the ones for ADC since they say what channel/pin the ADC is on.

    You can safely ignore anything to do with SPI/I2C/USART - they only exist on nRF52 so that they appear in the pinout diagram, eg. https://www.espruino.com/MDBT42Q#pinout

    What are correct names for pins and interfaces there? Pins are not Dxx but PDxx

    It's based on STM32 but is too much of a pain to explain here. Just use https://github.com/espruino/Espruino/blo­b/master/boards/MDBT42Q.py as the basis.

    Also how do I tell that the DFU bootloader should use negated touch button on pin 30?

    'BTN1' : { 'pin' : 'D30', 'pinstate' : 'IN_PULLDOWN' },
    ...
    pinutils.findpin(pins, "PD30", True)["functions"]["NEGATED"]=0;
    

    should work and should invert it in Espruino too.

    I2C

    Honestly, not sure why it's doing that, but why not just look at the PCB (or even the manufacturer's docs) to try and find out what the I2C parts are then try and look at those addresses?

About

Avatar for Gordon @Gordon started