flashing avr multi with 9xtreme maintenance mode

Post Reply
willhac
Posts: 89
Joined: Tue Feb 19, 2013 11:25 am
Country: France

flashing avr multi with 9xtreme maintenance mode

Post by willhac »

Hi guys,

I'm trying to get back in the hobby after a period of inactivity, so a good start is to update everything !
9xtreme now has the latest test version, the bootloader is updated.
It has an external avr multi module, and an internal one : I compiled hex files and uploaded them with ISP -> everything works.

The problem appears when I try to flash with maintenance mode (nice feature by the way !) :
-> optiboot flashed on both modules
-> external module (COM1 inverted) : I can flash it once, it works, but after that a second flashing attemp always fails, I must do something wrong with the bootloader
-> internal module (COM2) : flashing always seems to work, but the module doesn't operate, LED blinks fast like when optiboot has just been flashed

Any idea ?
Thanks in advance

User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: flashing avr multi with 9xtreme maintenance mode

Post by MikeB »

Make sure the compiled program for the AVR leaves space for the bootloader (512 bytes).
When you compile the Multi code, do you have "CHECK_FOR_BOOTLOADER" defined. Without this, the Multi firmware won't detect a flash attempt and drop out to the bootloader. You can check this if you try flashing a second time, but hold the bind button pressed until the flashing operation starts, this keeps the module in the bootloader.

I'm not sure about the internal module, I may need to connect one to my 9Xtreme to check.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
willhac
Posts: 89
Joined: Tue Feb 19, 2013 11:25 am
Country: France

Re: flashing avr multi with 9xtreme maintenance mode

Post by willhac »

I can't find "CHECK_FOR_BOOTLOADER", is it a line to comment/uncomment ? in _config.h ?
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: flashing avr multi with 9xtreme maintenance mode

Post by jhsa »

Mike, perhaps the firmware has to be compiled with the option "Upload Method" set to "STM32duino bootloader"??

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
willhac
Posts: 89
Joined: Tue Feb 19, 2013 11:25 am
Country: France

Re: flashing avr multi with 9xtreme maintenance mode

Post by willhac »

willhac wrote: Thu Sep 28, 2017 10:34 pm I can't find "CHECK_FOR_BOOTLOADER", is it a line to comment/uncomment ? in _config.h ?
...and also I don't have any bind button connected. Do I need it for flashing in maintenance mode ? If yes when do I press it ?
My hex files are 29 Ko and 43Ko with just the protocols needed, so they should leave space for the optiboot. These files don't have a bootloader/optiboot inside, is it OK ? (compiled with latest arduino software, I can post them later to check if needed)

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: flashing avr multi with 9xtreme maintenance mode

Post by jhsa »

Please disregard my post above.. I have just realized you are using the AVR module, not the STM32 one.. Sorry about that :(

João

Sent from my BLN-L21 using Tapatalk


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
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: flashing avr multi with 9xtreme maintenance mode

Post by MikeB »

Try getting the Multi source files from here: https://github.com/midelic/DIY-Multiprotocol-TX-Module, these have the "CHECK_FOR_BOOTLOADER" code included.
I posted these changes here: https://www.rcgroups.com/forums/showpos ... count=8563.

29K is fine for the AVR, is the 43K one for a STM module? If not, then it is too big for the AVR.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
willhac
Posts: 89
Joined: Tue Feb 19, 2013 11:25 am
Country: France

Re: flashing avr multi with 9xtreme maintenance mode

Post by willhac »

OK
I was downloading the code from here :
https://github.com/pascallanger/DIY-Mul ... -TX-Module
where the "CHECK_FOR_BOOTLOADER" code is not included.
As far as I understand I don't need the bind button.
I'll try again this evening.

Strange for the 43Ko file (size of .hex file in windows, not .bin) : when I compile it says only 49% of the space is used, I removed a lot of unused protocols.

Thanks again for the links ;)
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: flashing avr multi with 9xtreme maintenance mode

Post by MikeB »

43K is OK for a .hex file, I had assumed this was the size reported by the Arduino IDE.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
willhac
Posts: 89
Joined: Tue Feb 19, 2013 11:25 am
Country: France

Re: flashing avr multi with 9xtreme maintenance mode

Post by willhac »

Now flashing works well with the external module on second and further attempts. :D

Still the same with the internal one, it seems it doesn't program, despite this message :

0000 0000
Flashing Complete
1E95 0F10 0000 0000 0000
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: flashing avr multi with 9xtreme maintenance mode

Post by MikeB »

Please try setting the external module off and the internal module on with the Multi protocol. Also, set the Telem. Com port to 2.
Now cycle the power then look on the protocol menu. Do you see the firmware revision, e.g. (1.1.6.21) beside the Bind option?
The Led flashes fast if the selected protocol is not present in the module.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
willhac
Posts: 89
Joined: Tue Feb 19, 2013 11:25 am
Country: France

Re: flashing avr multi with 9xtreme maintenance mode

Post by willhac »

I can't see 1.1.6.21 beside the bind option...
If I flash the same file with the ISP the led stays solid (I can control a model) and I can see 1.1.6.21.

My external module is with board 2.3c, and the internal is with an arduino pro mini, does it make a difference ? Fuses are the same with D6 at H.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: flashing avr multi with 9xtreme maintenance mode

Post by MikeB »

A Pro Mini shouldn't make any difference.
I'll look to run some tests, but I'll need to re-wire my 9Xtreme as I have a bluetooth module on COM2 at the moment. I have a spare multi module I can use.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: flashing avr multi with 9xtreme maintenance mode

Post by jhsa »

On mine I have the i2C lines set to COM3 for the bluetooth. That frees COM2 for the internal module..

João

Sent from my BLN-L21 using Tapatalk

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
willhac
Posts: 89
Joined: Tue Feb 19, 2013 11:25 am
Country: France

Re: flashing avr multi with 9xtreme maintenance mode

Post by willhac »

My modules are updated and the radio is ready for flying, so don't look at it if it takes too much time.
I'm not sure I will flash the internal module so often !

Thank you both for your help

Edit : I found what happened : a second led and resistor was added to see the status led at the back of the radio, and the led on the pro-mini was not removed, it seems it perturbed D13 at startup and was entering optiboot almost each time. With the second led removed everything is OK !
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: flashing avr multi with 9xtreme maintenance mode

Post by MikeB »

Oh, good.
I have re-wired my 9Xtreme, put the bluetooth module on COM3, the module plugs in so I can still revert COM3 to the I2C function easily.
I've also added a 5-way connector for an internal module so I can plug a Multi module on to it. With that, I did just test flashing and using the internal module all works correctly anyway.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Post Reply

Return to “9Xtreme upgrade board”