Conditional steps in power management config

Hi all,

the ‘jump if’ steps in the power management config seem to allow us to wait for a clean shutdown of a linux on-board computer before the payload power is switched off.

Question: does a jump offset of 0 mean that the same step is executed again?
for example, does
PSQ_JUMP_IF_FUNCTION_IS_TRUE(checkZynqOff, 0)
call the checkZynqOff function again and again until it returns true?

Or: does
PSQ_JUMP_IFNOT_TIMEOUT(timer, 0)
wait until the timer expires?

thanks for your help

ulf

Hello Ulf,

I had a look at the document “Schroff Pigeon Point BMR-A2F-ATCA Software Architecture” and found:

PSQ_JUMP (offset): Jump to an instruction specified by the offset argument (relative to the current instruction).

Performing a fixed time delay:

/* Set timer 1 to a 50 ms timeout (delay) */ \

PSQ_SET_TIMER(1, 50) \

/* Wait until the timer expires */ \

PSQ_JUMP_IFNOT_TIMEOUT(1, 0)

Does that help?

Cheers,

Markus

Hi Markus,

thanks for the confirmation how these offsets are handled.
I’m now running this config:

PSQ_SET_TIMER(1, 30000)
PSQ_JUMP_IF_FUNCTION_IS_TRUE(isZynqShutDown, 2)
PSQ_JUMP_IFNOT_TIMEOUT(1, -1)

and it works, the loop ends if either there is a timeout or the function isZynqShutDown returns true.
I was a little bit surprised when I counted how often isZynqShutDown is called: a few thousand times per second. I hope the IPMC is not completely blocked by this loop for 30secs …

regards

ulf