• The Espruino Pico contains a significant number of pins not broken out to pins, but which are still potentially useful:

    C14/C15 - these go to pads that could be used for an RTC crystal. The pads are easy to access and hence re-purpose.

    A13-15 - These are used for JTAG debug. Debugging running code is beyond me (and probably 95+% of Espruino users), and the pins don't look too hard to solder to.

    B0 - As I understand, this is used to control the PFET to enable the Espruino to charge an externally connected battery from USB, if you close that jumper. Thus, if I don't want to do that, I should be able to just connect a little wire from that "jumper" (the appropriate side ofc) and just use it. But what gives me pause is that B0 is listed as a "USB" pin in the reference...

    Has anyone tried making use of these pins? Does anything have to be done in order to ensure that these pins can be used for GPIO?

    It definitely looks like something needs to be done for the jtag pins, based on jshardware.c:

    
    [#ifdef](https://forum.espruino.com/search/?q=%23ifdef) SWD_ONLY_NO_JTAG
      // reclaim A13 and A14
      GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE); // Disable JTAG so pins are available for LEDs
    [#else](https://forum.espruino.com/search/?q=%23else)
    [#ifdef](https://forum.espruino.com/search/?q=%23ifdef) STM32F1
    [#ifndef](https://forum.espruino.com/search/?q=%23ifndef) DEBUG
      // reclaim B3, B4, A13 and A14
    
      // don't disable this when compiling with DEBUG=1, because we need SWD
      // for in-circuit debugging and we probably don't care about the LEDs
      // see http://www.espruino.com/AdvancedDebug
    
      GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE); // Disable JTAG/SWD so pins are available for LEDs
    [#endif](https://forum.espruino.com/search/?q=%23endif)
    [#endif](https://forum.espruino.com/search/?q=%23endif)
    [#endif](https://forum.espruino.com/search/?q=%23endif)
    
    

    What I don't understand is what this means for the pico - because the function GPIO_PinRemapConfig is defined in stm32f10x_gpio.c/h - that file name implies that the file won't even be used for the pico which uses an stm32f40x, not stm32f10x like original - but it must be, because espruino compiles for the pico...

    As for C14/C15 - On the original Espruino Board, C15 is broken out, and has no particular limitations on it, so I suspect the same is true here. But what about C14? Is it available without doing something to keep it from trying to drive a crystal that's not present?

About

Avatar for DrAzzy @DrAzzy started