We are using S12ZVMC128.
Is there any way to turn off VDDX pin? We are using it to power some peripherals and would like to turn it off when the system is in low power mode.
the only way i see is to turn off external power supply VSUP.The VSUP supplies the internal voltage regulator from which the VDDX is derived.
However, there is Voltage Regulator Control Register (CPMUVREGCTL) and there are the EXTXON and INTXON bits which controls what voltage regulator will be used in the application, external or internal. If the EXTXON bit is zero, the INTXON must be one and the VDDX does not use external BJT. It is derived from internal VREG. Otherwise, if EXTXON=1, then INTXON=0 and internal VREG is selected.
Still, this option may not be much helpful in your case as the CPMUVREGCTL register is WRITE ONCE in Normal mode. So after MCU reset, this register must be written to select the VREG for VDDX domain.
Turning off the Vsup will turn off the microcontroller so that's not much use because the idea is to turn off all external peripherals running on VDDX on the board. I am aware of the EXTON because we do use it for the external BJT. Our thought was to turn the external BJT off and then not let the internal VDDX supply go outside the chip.
Yes, turning off the external BJT can be a solution.
There is one more option you can cosnider. It is High Current Output EVDD1 on PP0 pin intended for supplying external devices. It can supply up to 20mA. This pin is actually GPIO, but when set as output it has high current capability with over-current monitor feature. Prior to low power mode you should just write zero to PTP register (bit 0) which will be reflected on the port output pin.
We had considered the PP0 but that would heat up the MCU which we didn't want.
As per the datasheet, the EVDD1 can supply 20mA and the voltage will not drop more than 0.8V (VDDX-0.8V) and so you get 1.6mW power dissipation in worst case, so we don't understand how MCU would heat up. How much current do you expect external loads will draw? Did you test it already, or it is just a prediction?
It looks like the only good solution for this case would be using a GPIO pin to turn on/off a MOSFET to switch the power for the peripherals.
We have not tried it. We are running 1 IC and 1 optical sensor. in the worst case both of them together could require 16mA @3.3V (via LDO) + 15 mA @ 5V via VDDX directly.
So it would exceed the limit of EVDD1. We can however consider running 1 of them on EVDD1 and keep the other on VDDX.
However overall if there is no way to turn off VDDX pin and if we cannot switch between external and internal VDDX also then I suppose you are right that the only way would be to have an additional MOSFET which so far we were trying to avoid in order not to increase the BOM.
Retrieving data ...