HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Dec 12, 2011, 02:21 PM
manuLRK
Belgium
Joined Sep 2004
1,529 Posts
Revision f51a0f47df94255f86ce09211c59a55a9cb55a05 f51a0f47df Browse code
: (latest good turnigy Plush 10A)

When i compile with the motor break option i get these errors :

manu

Code:
AVRASM: AVR macro assembler 2.1.42 (build 1796 Sep 15 2009 10:48:36)
Copyright (C) 1995-2009 ATMEL Corporation

X:\@RC\tricopter\esc-25a-conversion\sim--tgy-f51a0f4-latest-good-turnigyPlush-10a\tgy.asm(53): Including file 'X:\@RC\tricopter\esc-25a-conversion\sim--tgy-f51a0f4-latest-good-turnigyPlush-10a\m8def.inc'
X:\@RC\tricopter\esc-25a-conversion\sim--tgy-f51a0f4-latest-good-turnigyPlush-10a\tgy.asm(87): Including file 'X:\@RC\tricopter\esc-25a-conversion\sim--tgy-f51a0f4-latest-good-turnigyPlush-10a\tgy.inc'
X:\@RC\tricopter\esc-25a-conversion\sim--tgy-f51a0f4-latest-good-turnigyPlush-10a\tgy.asm(896): error: Undefined symbol: sys_control
X:\@RC\tricopter\esc-25a-conversion\sim--tgy-f51a0f4-latest-good-turnigyPlush-10a\tgy.asm(896): error: Invalid register
X:\@RC\tricopter\esc-25a-conversion\sim--tgy-f51a0f4-latest-good-turnigyPlush-10a\tgy.asm(1307): No EEPROM data, deleting X:\@RC\tricopter\esc-25a-conversion\sim--tgy-f51a0f4-latest-good-turnigyPlush-10a\tgy.eep

Assembly failed, 2 errors, 0 warnings
alll is offline Find More Posts by alll
Reply With Quote
Sign up now
to remove ads between posts
Old Dec 12, 2011, 05:26 PM
Suspended Account
Joined Dec 2010
11,764 Posts
Quote:
Originally Posted by duypham11 View Post
I got the same error with my new AVR USB STK500 v2 when reflashing new fw for my blue series ESC 40A. (chip Atmega8A AU 1022).
Please help, does it have any trick for this?
I solder wire directly to chip as well.
Still have the same error as:
[IMG][/IMG]
Did you power the chip.
timecop is offline Find More Posts by timecop
Reply With Quote  (Disabled)
Old Dec 12, 2011, 05:42 PM
hacker
Canada, BC, North Vancouver
Joined Dec 2010
936 Posts
Quote:
Originally Posted by alll View Post
Hello,
I did my homework. I pinpointed the turnigy plush 10A not starting version
...
The guilty changes: Delay PWM comparator check by ~.5us if there is time to do so.

https://github.com/sim-/tgy/tree/1fc6477bbf6748e4056e8baedc7452d46f4e7a7b
Cool, thanks! Well, hmm, I guess I can buy this as the culprit. The gate capacitance on smaller FETs is typically a lot less, so the nfets on the 10A boards probably do turn off faster, and since we are pushing the check to after the actual turn off, we probably went too far. Since I still don't have the hardware (though I did try buying some http://www.dealextreme.com/p/10a-bec...ss-motor-72507 -- will post when they arrive), could you possibly check the timing on your hardware for me?

In "pwm_off_long", there's an "rcall pwm_wait" instruction, which does nothing but intentionally waste 7 (later 8) cycles in an attempt to sample the comparator as late as possible, when the FETs have been on long enough for the voltage to stop swinging, giving the comparator the best chance of being accurate at low duty cycles (such as during startup). On my 18A, 25A, 30A etc. test boards, the 7/8 cycles improved startup, and going much beyond 12 cycles started to cause missing. It's probably something more like 4 on that board.

You could remove the "rcall pwm_wait" line, and see if performance is normal again. Then, put in four "nop" lines in place of where the rcall used to be, and see if it's still OK/better/worse. If you could mess around with the number of nops (between 0 and 7) and let me know how it goes, that would be useful data.

This could be calibrated automatically on boot or after eeprom flash, which should be possible with or without a motor attached, but it's so short that a delay loop (and flag save) is probably difficult.
simonk is offline Find More Posts by simonk
Reply With Quote
Old Dec 12, 2011, 05:44 PM
hacker
Canada, BC, North Vancouver
Joined Dec 2010
936 Posts
Quote:
Originally Posted by alll View Post
Revision f51a0f47df94255f86ce09211c59a55a9cb55a05
...
When i compile with the motor break option i get these errors :
Sorry, the brake was broken back then. However, the latest version should work on your 10A board if you remove the "rcall pwm_wait" instruction.
simonk is offline Find More Posts by simonk
Reply With Quote
Old Dec 12, 2011, 06:32 PM
Registered User
Joined Aug 2010
44 Posts
@timecop: yes, I tried with power and not power as well.
Quote:
Originally Posted by timecop View Post
Did you power the chip.
duypham11 is offline Find More Posts by duypham11
Reply With Quote
Old Dec 12, 2011, 06:51 PM
Registered User
Canada, ON, Toronto
Joined Jan 2008
455 Posts
Quote:
Originally Posted by simonk View Post
Cool, thanks! Well, hmm, I guess I can buy this as the culprit. The gate capacitance on smaller FETs is typically a lot less, so the nfets on the 10A boards probably do turn off faster, and since we are pushing the check to after the actual turn off, we probably went too far. Since I still don't have the hardware (though I did try buying some http://www.dealextreme.com/p/10a-bec...ss-motor-72507 -- will post when they arrive), could you possibly check the timing on your hardware for me?

In "pwm_off_long", there's an "rcall pwm_wait" instruction, which does nothing but intentionally waste 7 (later 8) cycles in an attempt to sample the comparator as late as possible, when the FETs have been on long enough for the voltage to stop swinging, giving the comparator the best chance of being accurate at low duty cycles (such as during startup). On my 18A, 25A, 30A etc. test boards, the 7/8 cycles improved startup, and going much beyond 12 cycles started to cause missing. It's probably something more like 4 on that board.

You could remove the "rcall pwm_wait" line, and see if performance is normal again. Then, put in four "nop" lines in place of where the rcall used to be, and see if it's still OK/better/worse. If you could mess around with the number of nops (between 0 and 7) and let me know how it goes, that would be useful data.

This could be calibrated automatically on boot or after eeprom flash, which should be possible with or without a motor attached, but it's so short that a delay loop (and flag save) is probably difficult.
Guessing this is why my turnigy 6a won't turn on as well?
dowlinger is offline Find More Posts by dowlinger
Reply With Quote
Old Dec 12, 2011, 07:18 PM
Registered User
VA
Joined Nov 2009
2,666 Posts
Quote:
Originally Posted by duypham11 View Post
@timecop: yes, I tried with power and not power as well.
Try something simple like reading the device signature on the main tab just to make sure you can talk to it. Then try reading the fuses from fuse tab. Don't worry about flashing the hex till you know you are communicating with chip. I had a heck of a time at first with connections and saw that message many times.
pug398 is offline Find More Posts by pug398
Reply With Quote
Old Dec 12, 2011, 07:20 PM
hacker
Canada, BC, North Vancouver
Joined Dec 2010
936 Posts
Quote:
Originally Posted by dowlinger View Post
Guessing this is why my turnigy 6a won't turn on as well?
Probably, if by "won't turn on", you mean it does a crappy job of trying to start and/or never actually starts, but does at least try.
simonk is offline Find More Posts by simonk
Reply With Quote
Old Dec 12, 2011, 07:38 PM
Registered User
Canada, ON, Toronto
Joined Jan 2008
455 Posts
Quote:
Originally Posted by simonk View Post
Probably, if by "won't turn on", you mean it does a crappy job of trying to start and/or never actually starts, but does at least try.
Nope, mine didnt even try
I posted schematic a few posts back (post 575 ), if you want to look
Paul
dowlinger is offline Find More Posts by dowlinger
Reply With Quote
Old Dec 12, 2011, 09:03 PM
Registered User
Joined Aug 2010
44 Posts
I tried many times this.
I popped up the message every time I clicked on signature, fuse tab...
I do not know if the ESC blueseries 40A has been locked and it could not be reflashed.

I am using AVR Studio 4.x + AVRISP MKII, this still can flash for my KK board well.
When I used it for ESC. It also could connect to the ESC -> does it show all wires it connected correctly?

but when I tried to flash the chip, it turned out error.
I am very appreciate with any information about this issue.
Has anyone tried to flash 40A ESC HK blueseries? (connect wires to chip directly)

Thanks,
Duy

Quote:
Originally Posted by pug398 View Post
Try something simple like reading the device signature on the main tab just to make sure you can talk to it. Then try reading the fuses from fuse tab. Don't worry about flashing the hex till you know you are communicating with chip. I had a heck of a time at first with connections and saw that message many times.
duypham11 is offline Find More Posts by duypham11
Reply With Quote
Old Dec 12, 2011, 09:09 PM
Suspended Account
Joined Dec 2010
11,764 Posts
There's a very remote possibility they programmed them in parallel mode and disabled SPI programming. I don't think I've seen a esc that did that though. Especially if they had programming pads on it, that's sooo unlikely.
timecop is offline Find More Posts by timecop
Reply With Quote  (Disabled)
Old Dec 12, 2011, 09:55 PM
Registered User
Joined Aug 2010
44 Posts
@timecop: the pin-out of the ESC is same same as Mystery/HK blue series 30Ain first page) but there is a little diff of pins SCK and MOSI, so I connected directly.
If this is successful then I will flash for my 20A blue series. Because they have the same chip Atmega8A.
I am very curious with its result.
Quote:
Originally Posted by timecop View Post
There's a very remote possibility they programmed them in parallel mode and disabled SPI programming. I don't think I've seen a esc that did that though. Especially if they had programming pads on it, that's sooo unlikely.
duypham11 is offline Find More Posts by duypham11
Reply With Quote
Old Dec 12, 2011, 09:58 PM
Suspended Account
Joined Dec 2010
11,764 Posts
I know for a fact mysteryblue 30a from HK isn't locked because I've reflashed them myself.
So check your wires/connections once more.
timecop is offline Find More Posts by timecop
Reply With Quote  (Disabled)
Old Dec 13, 2011, 10:12 AM
Registered User
Joined Aug 2010
44 Posts
Thank you all very much. Finally, I can flash the ESC but then it burned ... it seems the firmware is not work for 40A... I tested it with 4sLipo, the motor just click, click then ESC was burned quickly.
I flashed my 20A with nFet(just guess it nFet - read it from HK) then I must trim the throttle to lower then the ESC started smoothly.
Now, I would like to know how to compile the code so I can do some modified.
Could someone tell me how to do?

Thank you in advanced,
Duy
duypham11 is offline Find More Posts by duypham11
Reply With Quote
Old Dec 13, 2011, 12:00 PM
manuLRK
Belgium
Joined Sep 2004
1,529 Posts
Here the results: tested with a turnigy 10A and a small brushless motor

work = tries to turn the rotor

Works:
"rcall pwm_wait" removed
6 nop's and lower

Doesn't work:
"rcall pwm_wait" present
7 nop's (slightly better then "rcall pwm_wait" )


manu

Quote:
Originally Posted by simonk View Post
Cool, thanks! Well, hmm, I guess I can buy this as the culprit. The gate capacitance on smaller FETs is typically a lot less, so the nfets on the 10A boards probably do turn off faster, and since we are pushing the check to after the actual turn off, we probably went too far. Since I still don't have the hardware (though I did try buying some http://www.dealextreme.com/p/10a-bec...ss-motor-72507 -- will post when they arrive), could you possibly check the timing on your hardware for me?

In "pwm_off_long", there's an "rcall pwm_wait" instruction, which does nothing but intentionally waste 7 (later 8) cycles in an attempt to sample the comparator as late as possible, when the FETs have been on long enough for the voltage to stop swinging, giving the comparator the best chance of being accurate at low duty cycles (such as during startup). On my 18A, 25A, 30A etc. test boards, the 7/8 cycles improved startup, and going much beyond 12 cycles started to cause missing. It's probably something more like 4 on that board.

You could remove the "rcall pwm_wait" line, and see if performance is normal again. Then, put in four "nop" lines in place of where the rcall used to be, and see if it's still OK/better/worse. If you could mess around with the number of nops (between 0 and 7) and let me know how it goes, that would be useful data.

This could be calibrated automatically on boot or after eeprom flash, which should be possible with or without a motor attached, but it's so short that a delay loop (and flag save) is probably difficult.
alll is offline Find More Posts by alll
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Rctimer 30A esc cutting out with KK board Efliernz Multirotor Talk 2 May 26, 2011 02:20 PM
Sold FS: Tricopter Parts- HK401b, Pentium 30A ESC, rctimer 750kv motors pwu_1 Aircraft - General - Miscellaneous (FS/W) 2 Jan 18, 2011 09:58 PM
Sold RCTimer 2826-6 + ESC 30A New in packaging will trade as well Pics Added! planebldr Aircraft - Electric - Power Systems (FS/W) 4 May 25, 2010 09:54 PM
Discussion RCTimer 30A Programmable ESC hunter7193 Power Systems 8 Jan 02, 2010 02:27 PM
For Sale Several New ESC's - 10a, 20a, 30a - Reduced Callen9345 Aircraft - Electric - Power Systems (FS/W) 0 Apr 20, 2009 02:31 PM