PASM Reset
ke4pjw
Posts: 1,155
in Propeller 1
I have been using
Thoughts?
clkset (255)to reset the Prop from PASM. I have found that this is not always reliable. I am unsure if possibly the clock frequency is not reset once the prop is reset or if there is other magic causing me grief. (Such as my other hardware needs a reset)
Thoughts?
Comments
EDIT: This is wrong. You can't specify an immediate value in an instruction's destination field. See PhiPi's post below.
I received a PM that clkset uses indirect addressing, therefore it is looking at the values in the register address you are pointing at.
I don't know if the parens allow you to pass a literal value. Could be some compiler trickery.
Either way, I will fiddle with it and determine if a literal value can be passed and if not, I will fix my code.
Thanks guys!
--Terry
This behavior is defined in the Propeller Manual: "Mode (d-field) is the register containing the 8-bit pattern to write to the CLK register."
-Phil
Works like a charm and does not require an extra register. Sweet!
--Terry
-Phil
Ah ..... so much talent that has faded from the forum, and who could forget deSilva and many others?
That is clever. If anyone tries using this to clkset other values, note that the bottom 3 bits of the #128 must be zero, since they're what specifies that it's a clkset and not some other hubop.