Mega 2560 (clone with CH340 USB-Serial chip)

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Message
Author
JackZ
Posts: 2267
Joined: Mon Feb 22, 2016 1:02 pm

Re: Mega 2560 (clone with CH340 USB-Serial chip)

#21 Post by JackZ »

Corjan wrote: Wed Apr 11, 2018 11:27 am
brodhaq wrote: Mon Apr 02, 2018 8:25 am Seriously, I can send you one by post, I have 10 of them here and already ordered genuine 2560 from Amazon :lol: You can return it to me at FSWeekend at Lelystad this year... Or you can just cheaply buy one here: https://www.ebay.com/itm/1275-Compatibl ... 534p1Du9mg - shipping from France would be very quick I believe.

Pavel
Hi,


We just received your Arduino's in the mail this morning. Thanks!
I went ahead, and tried to see why they are not working.

- The EEPROM of the non-CH340 clone Arduino cannot be flashed it seems. That is why the channel is not set correctly. Instead, I saved the channel in program memory (just like the Uno and Nano).
- I found a bug in our RS232 windows code, that results in certain COM ports not opening correctly.
- On the Raspberry Pi, the CH340 drivers where already installed. I has to make a code adjustment to make it work though.

So, to summarize, they all seem to work now on both Windows and the Raspberry Pi.
I will create new BETA's shortly.


Corjan
Hi Corjan

I had the same kind of problem (bad flashing checksum error) with an Arduino MEGA 2560 clone and found out (completely by chance) that was because the card had been used and flashed previously.
It appears that your flashing routine was not erasing completely the whole EEPROM memory space, leaving some previous garbage data in the upper memory addresses, hence the wrong checksum at the verification stage.

Solved the problem by uploading beforehand to the card and running once the « EEPROM CLEAR » Arduino sketch (found in the sample examples sketches IDE menu) to erase completely the EEPROM and to set it back to its original state, before attempting to flash again the card with the AM firmware.

Hope this helps

Jacques
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
Corjan
Posts: 2939
Joined: Thu Nov 19, 2015 9:04 am

Re: Mega 2560 (clone with CH340 USB-Serial chip)

#22 Post by Corjan »

Hi,


In one of the later installers, it would write the complete EEPROM space. But it seems like that doesn't help for this clone Arduino.

I don't know what is happening exactly, but this issue is easily fixed by just writing the channel into program memory instead of EEPROM.
Added bonus for me is that now all Arduino's use the same method of storing the channel.


Corjan

User avatar
brodhaq
Posts: 152
Joined: Wed Jun 29, 2016 4:13 pm

Re: Mega 2560 (clone with CH340 USB-Serial chip)

#23 Post by brodhaq »

Just for info, my arduino was brand new, never flashed before, so the garbage in EEPROM should not be the case (unless somebody tried this at the manufacturer's)
Never mind, glad it is fixed now :)

Pavel
Pavel Brodský
Prague, Czech Republic

Post Reply