Skip to content

Powering off using EXTINT #63

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gauteh opened this issue Aug 13, 2024 · 5 comments
Closed

Powering off using EXTINT #63

gauteh opened this issue Aug 13, 2024 · 5 comments

Comments

@gauteh
Copy link

gauteh commented Aug 13, 2024

Hi, I am trying to turn of the MAX-M10S using the suggestions here: sparkfun/SparkFun_u-blox_GNSS_Arduino_Library#228

I have enabled both EXTINTBACKUP and EXTINTWAKE, so that the device should be completely in the control of the EXTINT pin and not wake up on any other sources. It does not seem to work yet. Can you spot anything wrong? Maybe I need to configure PSMOO as well?

https://github.com/gauteh/omb-2024-nano/blob/main/src/gnss_manager.cpp#L7:

  wdt.restart();
  Serial.println(F("Attempting to configure GPS enable pin.."));

  GnssWire.begin();

  /* turn_gnss_on(); */
  delay(1000); // Give it time to power up
  wdt.restart();

  Serial.println(F("gnss wire started"));
  Serial.flush();

  if (!gnss.begin(GnssWire, 0x42)){
    Serial.println(F("problem starting GNSS"));
    return false;

    // power things down
    delay(500);
  } else{
    Serial.println(F("success starting GNSS"));
  }

  // now we know that we can talk to the gnss
  gnss.setI2COutput(COM_TYPE_UBX); // Limit I2C output to UBX (disable the NMEA noise)
  delay(100);

  // If we are going to change the dynamic platform model, let's do it here.
  // Possible values are:
  // PORTABLE,STATIONARY,PEDESTRIAN,AUTOMOTIVE,SEA,AIRBORNE1g,AIRBORNE2g,AIRBORNE4g,WRIST,BIKE
  if (!gnss.setDynamicModel(DYN_MODEL_STATIONARY)){
    Serial.println(F("GNSS could not set dynamic model"));
  }


  Serial.println(F("configuring..."));
  gnss.newCfgValset(); // Defaults to configuring the setting in RAM and BBR
  gnss.addCfgValset(UBLOX_CFG_PM_EXTINTBACKUP, 1);
  gnss.addCfgValset(UBLOX_CFG_PM_EXTINTWAKE, 1);
  gnss.sendCfgValset(); // Send the packet using sendCfgValset
  Serial.println(F("done."));

  wdt.restart();
  GnssWire.end();

  return true;
}

@PaulZC
Copy link
Collaborator

PaulZC commented Aug 13, 2024

Hi Gaute (@gauteh ),

It does not seem to work yet.

How are you judging this? Current draw?

Best,
Paul

@gauteh
Copy link
Author

gauteh commented Aug 13, 2024

Yes. I have checked that the pin is low. Is there a good way to test?

@PaulZC
Copy link
Collaborator

PaulZC commented Aug 13, 2024

Thanks Gaute.

Do you see any reduction in the current when the INT pin is low? The current should reduce, but will (probably) still be several mA.

@PaulZC
Copy link
Collaborator

PaulZC commented Sep 27, 2024

Closing... Please reopen if you need more help with this.

Best,
Paul

@PaulZC PaulZC closed this as completed Sep 27, 2024
@gauteh
Copy link
Author

gauteh commented Sep 27, 2024

Yes, I realized it is too easy to wake it up again, so I will have to make some power switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants