Difference between power cycle and F7 in Prop Tool
Paul M
Posts: 95
What is the difference between power cycling the prop and doing an "identify hardware" (F7) in the propeller·tool?
The reason I ask is that I am having problems with an I2C device:
1. I download the code to EEPROM using F11 - everything works
2. I power cycle and the device stops resonding altogether
3. I do an F7 and the device start working again.
Any ideas?
Paul
The reason I ask is that I am having problems with an I2C device:
1. I download the code to EEPROM using F11 - everything works
2. I power cycle and the device stops resonding altogether
3. I do an F7 and the device start working again.
Any ideas?
Paul
Comments
I have had the same, or simular, thing with the Prop. On one of my attemps of DracBlade the unit would chuck out an error when powered on but never on a reset button push, or any of the F7,8,9,... resets.
Over the last weekend I was playing with some bi-lateral swithes to put a KBD onto the boot EEPROM's lines. It was to switch the boot EEPROM out at the first drop of the KBD clock line P27 (I think). It didn't work out as expected from power up, as the P27 was dropped,·at a low impedance, before the·EEPROM had finished dumping, and therefore before the Prop should have started·. Again the same thing didn't happen from resets.
(I then thought about it and found that the start of H sync was a reliable signal to use, that is still on P17 and didn't glitch, although it is low to start with I havent seen any evidence of it becoming low-Z, before becoming active.)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Post Edited (Toby Seckshund) : 3/9/2010 4:26:28 PM GMT
When the Propeller boots (or reboots) all registers are in a known state, except the system counter. On cold boots, the counter will generally be a similar value every boot, but with resets it tends to vary by significantly more. Try waiting up to a minute after resetting the Propeller to see if your program magically starts running. If so, then you probably have a waitcnt instruction that is looking for an absolute cnt value.
— David Carrier
Parallax Inc.
I have yet to try these things from a battery source, rather than the SMPSUs I usually have.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Your I2C device probably requires a longer time to come out of reset after power-up than you're allowing it. Try putting a delay at the beginning of your program before trying to access it.
-Phil
Phil, there is a delay of 100ms -changing this to several seconds makes no·difference.
David, the program starts running as expected, output is sent to the serial port for example, it is just that the connected·device responds differently.·Your answer indicates that the I/O pins are in the same state for a RES or Power cycle so this behaviour is·unlikely to be caused·by the propeller.
I've done some more testing and I am now suspecting that it is the I2C device itself (a pressure sensor in this case) that is the cause of the strange behaviour. Obviously a RES does not power down the device which then seems to latch into a "different" state. I am in discussions with the manufacturer and will let you know the outcome.
Paul