MikeBland / mbtx

er9x/ersky9x radio firmware
GNU General Public License v2.0
147 stars 56 forks source link

r218 does not boot on 9XR pro #14

Closed mikeller closed 5 years ago

mikeller commented 8 years ago

version: r218 (ersky9xr_rom.bin, downloaded from http://www.er9x.com/)

behaviour: does not boot, after switching on TX the display is a random pattern, the speaker makes tac-tac-tac-... sound.

MikeBland commented 8 years ago

I'm not sure what the problem is, I just re-flashed my ersky9xr_rom.bin and also downloaded from www.er9x.com and flashed that. Both work fine.

Did you flash using the bootloader and eepskye or use SAM-BA?

mikeller commented 8 years ago

I used the bootloader (V1.5) and eepskye (r419) to flash.

Do I have to reset the existing configuration, or should the upgrade take care of converting it?

MikeBland commented 8 years ago

The EEPROM should continue to work automatically. The structure of the data is backward compatible, it just extends. Please retry the flash, the bootloader should still work as it is not automatically updated. Double check you used ersky9xr_rom.bin and not ersky9x_rom.bin.

mikeller commented 8 years ago

I tried again, and tried copying ersky9xr_rom.bin onto the SD card and flashing with the boot loader. Still no luck. I also updated the boot loader to V1.7 and tried again, no luck.

Also, I downloaded ersky9xr_rom.bin again, to make sure it wasn't corrupt. Same result. :-(

MikeBland commented 8 years ago

How did you update the bootloader? Did you use "maintenance mode" (both horizontal trims apart at power on)?

mikeller commented 8 years ago

Yes, I used 'maintenance mode' to update the bootloader. (Is there a comprehensive manual for er9x documenting the advanced features like maintenance mode?)

MikeBland commented 8 years ago

Manuals are here: http://openrcforums.com/forum/viewtopic.php?f=122&t=5575#p79483. The interesting thing is "maintenance mode" is part of the main program, so it does run in that mode. This means much of the flashed firmware is working (LCD driver, buttons, SD access). Please try switching on while holding the MENU button pressed. This will invoke a "Quick Select" of the first model in the EEPROM. You should get a display showing, in large letters, "Loading Model1", which should remain until you release the MENU button. This test will tell if the firmware execution is getting a certain amount further than testing for "maintenance mode". Another test is to remove the SD card, then power on.

mikeller commented 8 years ago

Ah, that was a misunderstanding then. In order to use maintenance mode to reflash the bootloader, I first had to flash the version of the firmware that I build from next on 30/12/2015. Trying to use the outwards trim keys to get into maintenance mode on r218 resulted in the same behaviour as trying to boot into r218 default mode.

Will try holding MENU and booting without the SD card later on.

mikeller commented 8 years ago

Unfortunately neither holding MENU (display stuck on 'Loading ', tac - tac - tac sound) nor booting without the SD card (display random pixels) made r218 work on my TX. I also tried creating a new, empty configuration with eePskye, and writing it to the EEPROM, with no more success.

MikeBland commented 8 years ago

It is possible the hardware watchdog in your processor is causing this, it may be running fast. The sound from the speaker is possibly a sound at startup that is repeating due to the watchdog restarting the processor. At what rate does the sound occur, about every half a second? I've posted a test version here: http://openrcforums.com/forum/viewtopic.php?f=7&t=4676. Please try it and see if it cures the problem.

mikeller commented 8 years ago

The rate is (as a rough guesstimate) about once a second. Let me know if you need it more exact, I can time it. Unfortunately the new version you have posted did not fix it. :-(

mikeller commented 8 years ago

I think I found the culprit. With the change below the TX boots normally (and this is not meant as a fix, just an isolation of the problem).

diff --git a/radio/ersky9x/src/drivers.cpp b/radio/ersky9x/src/drivers.cpp
index b8da9a2..0b2460a 100644
--- a/radio/ersky9x/src/drivers.cpp
+++ b/radio/ersky9x/src/drivers.cpp
@@ -2202,7 +2202,7 @@ void init_software_com1(uint32_t baudrate, uint32_t invert, uint32_t parity)

 void disable_software_com1()
 {
-       stop_timer5() ;
+//     stop_timer5() ;
        CaptureMode = CAP_PPM ;
        PIOA->PIO_IDR = PIO_PA5 ;
        NVIC_DisableIRQ(PIOA_IRQn) ;
mikeller commented 8 years ago

Please disregard my above comment. I just built the firmware from unmodified 'master' as a test, and this seems to work fine as well. My build command is make REVB=1 DEBUG=1 STAMP=1 PHASES=1 REVX=1.

CptanPanic commented 8 years ago

Just wanted to add that I have installed stock pre built release of 218 for 9XR Pro and it works fine here.

robin13 commented 7 years ago

+1 exactly same for me: clicking (approx 1s beat) and screen looks like this: img_20160720_170544 I can re-flash r212 (was delivered with that) and works again

robin13 commented 7 years ago

In my case I replaced the SD card, and then it worked... seems like the one supplied with the 9XR Pro was crappy/defective... :(