New bug possibly discovered on 9x ("pot no. 3 bug")
- KAL
- Posts: 552
- Joined: Thu Oct 10, 2013 4:36 pm
- Country: Germany
- Location: somewhere near Rothenburg ob der Tauber
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
But please note that there is a little difference:
The horizontal trims ARE tied to analog ground (stock) and should be tied to digital ground
but the pots ARE tied to digital ground and (maybe) should be tied to analog ground!
Klaus
The horizontal trims ARE tied to analog ground (stock) and should be tied to digital ground
but the pots ARE tied to digital ground and (maybe) should be tied to analog ground!
Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
( 9XR PRO / erSKY9x / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
Yeah, funny isn't it?
Lets see what Mike finds with the data we provided.
João
Lets see what Mike finds with the data we provided.
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
- MikeB
- 9x Developer
- Posts: 17990
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
So far I have no explanation. There are 8 analog inputs, read in sequence, the 4 sticks, the three pots and the battery voltage. The same code is used for all of these.
I do have one idea though. The processor includes a JTAG port, that uses the last 4 analog input pins, so includes all three pots.
P1 is the JTAG clock, while P3 is the JTAG data output.
The JTAG port is only enabled one of the fuses is programmed to a 0. It is bit 6 of the fuse HIGH byte.
If you have this problem on a radio, please read the fuses and see what this one is.
There is a bit in a processor register that could be set that should also disable the JTAG port.
Mike.
I do have one idea though. The processor includes a JTAG port, that uses the last 4 analog input pins, so includes all three pots.
P1 is the JTAG clock, while P3 is the JTAG data output.
The JTAG port is only enabled one of the fuses is programmed to a 0. It is bit 6 of the fuse HIGH byte.
If you have this problem on a radio, please read the fuses and see what this one is.
There is a bit in a processor register that could be set that should also disable the JTAG port.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
how to do that on the 9xtreme radio?
Thanks
João
Thanks
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
Thank you Mike.MikeB wrote:So far I have no explanation. There are 8 analog inputs, read in sequence, the 4 sticks, the three pots and the battery voltage. The same code is used for all of these.
I do have one idea though. The processor includes a JTAG port, that uses the last 4 analog input pins, so includes all three pots.
P1 is the JTAG clock, while P3 is the JTAG data output.
The JTAG port is only enabled one of the fuses is programmed to a 0. It is bit 6 of the fuse HIGH byte.
If you have this problem on a radio, please read the fuses and see what this one is.
There is a bit in a processor register that could be set that should also disable the JTAG port.
Mike.
Forgive my probably electronics-naive question, but would the above mean that P3 also is in theory capable of triggering the issue to P1, namely the opposite of what we have seen so far?
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
Fuses Hi reads 81 on both radiosMikeB wrote: If you have this problem on a radio, please read the fuses and see what this one is.
Mike.
Reinhard
- MikeB
- 9x Developer
- Posts: 17990
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
No, P1 is a JTAG input. P3 is a JTAG output, so only P3 will be affected at all.Nadim wrote:but would the above mean that P3 also is in theory capable of triggering the issue to P1
I'll see if I can post test versions of er9x with the register bit set.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
Mike, the 9xtreme does also have the problem. Can you fix it by flashing the 9x mainbaord using the 9xt?
Thanks
João
Thanks
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
- MikeB
- 9x Developer
- Posts: 17990
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
I've just posted a test version for the 9Xtreme. This includes a (possible) fix in the 'slave' for this problem.
From the main screen go UP LONG, then then LEFT twice. This gets you to the "Slave Revision" screen. This should show the current revision as 0.3, with 0.4 available. Just press MENU LONG, and the slave will be updated to 0.4.
Mike.
From the main screen go UP LONG, then then LEFT twice. This gets you to the "Slave Revision" screen. This should show the current revision as 0.3, with 0.4 available. Just press MENU LONG, and the slave will be updated to 0.4.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
Thanks Mike.. Will do now..
João
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
9xtreme. It actually got worse.
Moving P1 and P2 makes P3 go to full as before. Continue to move P1, P3 jumps between min and max, but now I can't make it recover and work normally, or I didn't find out how to. Need to reboot.
Also, it is much easier to make the problem happen now.
João
Moving P1 and P2 makes P3 go to full as before. Continue to move P1, P3 jumps between min and max, but now I can't make it recover and work normally, or I didn't find out how to. Need to reboot.
Also, it is much easier to make the problem happen now.
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
- MikeB
- 9x Developer
- Posts: 17990
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
OK, another test version of 9Xtreme posted. I found you have to write the JTAG disable bit TWICE to make it change.
The slave revision is still 0.4, but it should write on command anyway.
Mike.
If this problem is caused by the JTAG port, it will likely also depend on your battery voltage as this may determine the apparant logic level on the TDI pin.
The slave revision is still 0.4, but it should write on command anyway.
Mike.
If this problem is caused by the JTAG port, it will likely also depend on your battery voltage as this may determine the apparant logic level on the TDI pin.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
I couldn't make it fail now.. will try some more later..MikeB wrote:
If this problem is caused by the JTAG port, it will likely also depend on your battery voltage as this may determine the apparant logic level on the TDI pin.
So if it depends on the battery voltage that means that the problem can't be really fixed?
My battery voltage at the moment is 7.4V
I am using 6 cell NiMhs pack on this radio..
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
I soldered a wire to pin57 (P3 input ) of the processor.
With p3 at minimum position I measure 0.01 Volt on the CPU pin and on the slider of P3
When the error is there, the CPU pin measures 4.44 Volt and the P3 slider 0.05 Volt
That means, that the measured and displayed voltage are correct with respect to what is available on the pin.
It looks like there is a pullup switched on to the input pin
But what I do not understand is, how does it survive a reboot ?
Reinhard
With p3 at minimum position I measure 0.01 Volt on the CPU pin and on the slider of P3
When the error is there, the CPU pin measures 4.44 Volt and the P3 slider 0.05 Volt
That means, that the measured and displayed voltage are correct with respect to what is available on the pin.
It looks like there is a pullup switched on to the input pin
But what I do not understand is, how does it survive a reboot ?
Reinhard
- MikeB
- 9x Developer
- Posts: 17990
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
No, if this problem is the JTAG port, and my change disables the JTAG port, then the problem IS fixed. I'm running from 8 NiMh cells, so have around 10V supply voltage, which is probably giving a logic '1'. 7.4V may give a logic 0..
I've posted a possible fix for the'128 on the test versions thread: viewtopic.php?f=5&t=4598.
ReSt: The 'pullup' is likely the JTAG TDO pin driving out high.
Mike.
I've posted a possible fix for the'128 on the test versions thread: viewtopic.php?f=5&t=4598.
ReSt: The 'pullup' is likely the JTAG TDO pin driving out high.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
Thanks Mike.. I misunderstood your post above, hence I asked..
João
P.S. - Out of topic, but having trouble with my 9xtreme bootloader to PC connection since a couple months now.. it was a nightmare to connect to the computer and update the tx now. Will continue this on another thread..
João
P.S. - Out of topic, but having trouble with my 9xtreme bootloader to PC connection since a couple months now.. it was a nightmare to connect to the computer and update the tx now. Will continue this on another thread..
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
Mike,
flashed with your er9x-128p3 fw and it's still the same
it still fails.
Reinhard
flashed with your er9x-128p3 fw and it's still the same
it still fails.
Reinhard
- MikeB
- 9x Developer
- Posts: 17990
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
Sorry, I slipped up and didn't include setting the bit twice. Just about to post a er9x-128p3a !
Mike.
(Posted!)
Mike.
(Posted!)
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
And I agree, P3 input pin is an active output when the failure occurs.
I connected a 220 Ohm resistor to ground and the voltage decreased from 4.44 to 3.98 Volt (1kohm to ground didn't make a real difference on the voltage level)
Reinhard
will test 3a
I connected a 220 Ohm resistor to ground and the voltage decreased from 4.44 to 3.98 Volt (1kohm to ground didn't make a real difference on the voltage level)
Reinhard
will test 3a
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
Flashed the P3a version and could not recreate the failure inspite of working hard for several minutes.
BUT
I reflashed the failing previous version and couldn't recreate the failure anymore !!!! (My thumbs got tired from truning the pots)
Is it possible that setting the appropriate bits correctly once, solved the problem forever?
I wil retry later again.
Reinhard
BUT
I reflashed the failing previous version and couldn't recreate the failure anymore !!!! (My thumbs got tired from truning the pots)
Is it possible that setting the appropriate bits correctly once, solved the problem forever?
I wil retry later again.
Reinhard
- MikeB
- 9x Developer
- Posts: 17990
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
My understanding, from the datasheet, is the bit is cleared on power up/reset.
Mike.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
So is it safer to set the high fuse to C1 ? (eepe sets it to 81)MikeB wrote: The JTAG port is only enabled one of the fuses is programmed to a 0. It is bit 6 of the fuse HIGH byte.
Mike.
- MikeB
- 9x Developer
- Posts: 17990
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
It is an option, but not that necessary. As long as the bit in the MCUCSR register is set, the JTAG is disabled. The bit is also protected, you have to write it twice, within 4 clock cycles, to change it.
I'll change eepe to set the bit in the high fuse anyway.
Mike.
I'll change eepe to set the bit in the high fuse anyway.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
My testing with the P3a version shows that I was not able to recreate the faiure during two times of five minutes intensive moving P1 back and forth. (and I could again recreate it with the older version P3).
To me it seems. that this fix solves the problem.
Mike, can you provide me the source code for the fix, so that I can merge it into my privately modified code base?
Reinhard
To me it seems. that this fix solves the problem.
Mike, can you provide me the source code for the fix, so that I can merge it into my privately modified code base?
Reinhard
- MikeB
- 9x Developer
- Posts: 17990
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
Just a few lines into main():
Mike.
Code: Select all
#ifdef CPUM2561
uint8_t mcusr = MCUSR; // save the WDT (etc) flags
SaveMcusr = mcusr ;
MCUSR = 0; // must be zeroed before disabling the WDT
MCUCR = 0x80 ;
MCUCR = 0x80 ; // Must be done twice
#else
uint8_t mcusr = MCUCSR;
MCUCSR = 0x80 ;
MCUCSR = 0x80; // Must be done twice
#endif
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
Mike,
thanks for the fix.
I have applied it to ER9x r218 and Opentx 2.1.7 and it looks like there is no more problem
Reinhard
thanks for the fix.
I have applied it to ER9x r218 and Opentx 2.1.7 and it looks like there is no more problem
Reinhard
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
Included in mainline OpenTX too, thanks...
Impressive that this was never noticed in >5 years...
Impressive that this was never noticed in >5 years...
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
Well, I guess no one wiggles the pots like crazy to fly a model
But great that someone did
João
But great that someone did
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
- MikeB
- 9x Developer
- Posts: 17990
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
You don't need the:Kilrah wrote:Included in mainline OpenTX too, thanks..
MCUCSR = 0;
before the:
MCUCSR = 0x80 ; // Disable JTAG port that can interfere with POT3
(saves 2 bytes of flash ).
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: New bug possibly discovered on 9x ("pot no. 3 bug")
Ah ah, I wasn't flying luckily.jhsa wrote:Well, I guess no one wiggles the pots like crazy to fly a model
But great that someone did
João
Probably the reason why nobody had detected it is that (as far as I've heard) there are few people that program something on their P3, preferring P1 and P2 for their convenience due to the position. So even if P3 stopped working during flight, nobody probably noticed it before switching off the TX.