Can the high frequency clock be enabled while in DS (0)? I am seeing the clock get shut down when I go into DS but I am not sure if it's me or the MCU doing it yet. The documentation isn't clear on what the expected behavior for these pins is. The bits (PAXX_XTAL_OE) are set in the PIO_WAKEUP_EN1 register which implies that there is a power mode component to the functionality.
Edit:
I have XTAL_PDM_DIS and OSC32M_PDM_DIS set to 0 in PMU_CTRL_2 so the clocks themselves should be running.
Hi Jose Rafucci,
I test this using the demo_apps power_mode_switch of the SDK 2.2 version. Are you using this example to test it?
No, I was using the power_profiling example in wireless_examples/bluetooth.
Behavior is the same in the power_mode_switch code. I see a clock on PA25 when in Active and Sleep modes but nothing in either PD mode. Are you maybe running this in the debugger?
Added this after initializing the clocks:
//Enable pass through XTAL to pin 25 CLOCK_EnableClkoutSource(kCLOCK_Clkout_XTAL, 1); CLOCK_EnableClkoutPin(kCLOCK_Clkout_PA25_XTAL, 1); //Leave XTAL on when in PD SYSCON->PMU_CTRL2 &= ~SYSCON_PMU_CTRL2_XTAL_PDM_DIS_MASK;
Hi Jose Raffucci,
Sorry for the late reply. I asked the application team about this and you are right, the only modes where the high frequency clock output is enabled is the RUN and SLEEP mode.
Best Regards,
Alexis Andalon
Thank you for confirming the behavior.
While the MCU is in sleep mode the system clock to the CPU is stopped and execution of instructions is suspended until either a reset or an interrupt occurs.
That may be true, but I am not trying to use the MCU. I am trying to feed out the XTAL signal on PA25.
According to the UM, the XTAL can be left powered on when in DS:
And the CLK_XTAL_OE is fed from the XTAL and not the system clock:
So the implication is that this should work. I'm trying to figure out why. Does the PMU shut off the GPIO? Doc says that the PIN_MUX_CTRL is ignored when an OE bit is set.
Hi Jose Raffucci,
I was testing your problem using the SDK example for power mode switch and I'm not having any issue with seeing the frequency on the pin PA25.
Could you share how are you configuring the PD mode to try to repeat your issue?
Best Regards,
Alexis Andalon
nxf46116 wrote:
I'm not having any issue with seeing the frequency on the pin PA25.
Are you sure about that?
Here's what I see:
POR (PowerState 0 - PD0): No Clock
Press PB1(PowerState 1 - PD0): No Clock
Press PB1(PowerState 2 - Active): Clock
Press PB1(PowerState 3 - Sleep): Clock
Press PB1(PowerState 4 - PD1): No Clock
Hi Jose Raffucci,
While the MCU is in sleep mode the system clock to the CPU is stopped and execution of instructions is suspended until either a reset or an interrupt occurs. So if you're using the high frequency clock to supply the MCU this will stop when you enter the sleep mode.
I hope this answer your question.
Best Regards,
Alexis Andalon