Using py.setup_int_pin_wake_up(True)



  • According to the sleep documentation at https://docs.pycom.io/pytrackpysense/apireference/sleep/ you can wake up a lopy4 when using a pysense using the INT pin which is PIC_RC1 on the pysense.

    When I run the "Quick usage example" I'm unable to wake up the board by bringing P9 / PIC_RC1 to ground.

    I've tried setting up the pin ( p_in = Pin('P9', mode=Pin.IN, pull=Pin.PULL_DOWN) ) but it doesn't wake up. There are suggestions to cut p9 but as this is advertised to work I do expect that this should work!!

    Can someone from Pycom state categorically whether you can wake up a lopy4 when using pysense on pin9 and again(rising or falling edge) please?

    Surely the correct thing to do would be to update the documentation if the only resort is cutting a pin!?



  • @Gijs thank you for your reply. Are you suggesting that there are two possible solutions (1. cut the trace and 2. add a 10Kohm resistor in-line on pin 9 and connecting that to 3v3) or are these both part of a single solution?

    Perhaps you can post a full example with wiring diagram so that there is a canonical solution to the problem with little room for misinterpretation and ambiguity?

    I just bought 3 of these boards for a customer based on the specs in the documentation and am very disappointed that it is not capable of advertised capability, so a full example would help retain some faith in the platform.


  • Global Moderator

    As stated in the other forum post, the Pysense and Pytrack sleep modes are enabled by completely cutting power to the Lopy4 (or any other) board. This is done by the PIC controller on the Pysense or Pytrack board. The line you suggest ( p_in = Pin('P9', mode=Pin.IN, pull=Pin.PULL_DOWN ) will not help, as the power to the controller is cut, thus the GPIO states are not remembered. Disconnecting the pin9 from the Lopy4 board by cutting the trace should help with the floating voltages (In their case, it was useful, as the Lopy needed the pin for a different function, it is not actually pin9 that is used here, but the PIC_RC1). Now I am unable to test this at the moment, but I believe using a pulldown resistor, like 10Kohm, on pin 9, will also keep the voltage down. Then connect the button to 3.3V on the other side. Pressing should then give a rising edge. As I stated before, I am not able to test my theory at the moment, are you able to?.
    Gijs


Log in to reply
 

Pycom on Twitter