MAXREFDES100# Health Sensor Platform

How to modify power-on process for the MAXREFDES100 / MAX32620HSP?

19 Apr 2017

I appreciate the ease of "burning" new firmware that the mbed platform provides. However, for my current application, I'd like to be able to modify the power-on sequence so that it doesn't wait for a button-press when power is first applied, nor use a long button press for power-off.

We're using the gcc-arm toolchain.

Does anyone have a simple suggestion for the "cleanest, most in-the-spirit-of-mbed" means to modify the power-up sequence so that it bypasses the "deep sleep until button press interrupt" and just continues on to start main() when power is applied?

I cannot find where the system is waiting for a button-press rather than for a "power-on" event to start; rather, it seems to set up the button as an interrupt and then puts itself to sleep. (GPIO Port 2, pin 1).

The "startup_max32620.S" seems to be _the_ power-up task, and it calls "SystemInit()" in system_max32620.c which contains some reference to the power register around line 74. Best I can tell, though, is that it exits this and then copies the actual program from FLASH into working RAM in the lower part of startup_max32620.S.

I can't see where gpio_irq_wud_config is called to set the button to enable wake-up, but I'm assuming that's what's happening.

Any suggestions how best to proceed?

-Tom

05 Jun 2017

I have briefly looked at this as well, and it seems to me that the actual interrupt handler is done in the mbed-OS. If this is true, there probably is not an easy way to modify the actual OS for this specific case. I have looked at the mbed-os 'entry' in my project tree, and it only seems to be doxygen documentation of the mbed-os classes and not actual code.

09 Jun 2017

I think that the long power off is due to the MAX14720. The switch actually goes to an input on the MAX14720 (KINb) and this then drives the MAX32620's P2_1 via KOUTb. So to make a shorter turn-off time, you could implement a timer that's triggered off P2_1, and when the timer expires, check to see if P2_1 is still low and then issue a command to the MAX14720 to shut off power.

Regarding the requirement to press the button even though power is applied (via USB) seems also by design of the MAX14720. I'm not sure how you'd make this turn on as soon as power is applied unless there is some non-volatile register in the MAX14720 to allow for this.