AVR2054 Bootloader PC tool

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am using Bootloader PC tool on windows 7. For serial COM port i am using USB to TTL serial converter on my PC. After selecting COM port on Bootloader PC tool, setting baud rate to 38400, 1, 8 , No parity and click on upload button gives error - 'Can't start Uploading'. I don't see handshake request packet coming out on serial port - 0xB2 0xA5 0x65 0x4B as per the AVR2054 App note. Can anyone please guide me on what could be the problem?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just out of interest what made you choose AVR2054 specifically? I think most folks round here would usually choose some variant of Optiboot these days and that would then mean using avrdude t the PC end. As this is such a popular choice you will find a lot of support for both what goes on in the AVR and also how to drive it at the PC end.

 

Optiboot implements STK500 protocol as documented in Atmel/Microchip's application note AVR061

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
... STK500 protocol as documented in Atmel/Microchip's application note AVR061
Another bootloader is AVR109.

Reason : AVRDUDE on Android and relatively inexpensive Android tablets.

 

AN1644 AVR109: Using Self Programming on tinyAVR and megaAVR devices | Application Note | Microchip Technology

ZFlasher AVR - Apps on Google Play (expand 'About this app')

Alcatel JOY TAB™ 2 - Work and play just got an upgrade : Alcatel Mobile

[bottom, 168USD at T-Mobile USA]

  • USB Type: USB-C; USB OTG

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PradeepPatel wrote:
... windows 7. For serial COM port i am using USB to TTL serial converter on my PC.
Motherboard? (not notebook PC);if yes then there's a COM for the motherboard's southbridge UART.

Otherwise, the USB UART's INF must be complete, precise, and correct such that the correct driver is bound to the USB UART.

PradeepPatel wrote:
Can anyone please guide me on what could be the problem?
Try another PC though Windows 10? (major rework of WinUSB and usbser.sys [driver])

 


Pololu Serial Transmitter utility for Windows

 

What is new with Serial in Windows 10 - Microsoft Tech Community - 270855

[1/4 page]

1.   Improved Serial over USB driver support in Windows 10

...

In Windows 10, we added inbox support for USB CDC Abstract Control Model (ACM) compliant hardware. Usbser.sys is now installed as a compatible ID match for USB CDC compliant hardware, without requiring a 3 rd party driver or inclusion via modem INFs.

...

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thankyou for your help...i could resolve it. When i selected the file with srec format for downloading, it had extension as .s19 and tool added additional .srec extension to it. so the filename became xxx.s19.srec which was leading to this error. 

 

@clawson: I am first time implementing bootloader with AVR controllers. Got some link to AVR2054 from my earlier queries to community and hence started with it. I will go through your suggestion too and check out if i can move to using avrdude on PC end.

 

@gchapman: I first started using PC end tool with Windows 10 but i found issue with it. the serial port option was not visible in the tool. i searched on this community and found that other users faced the same issue with windows 10 but the solution suggested in the thread didn;t worked for me. Hence i moved to windows 7 PC where i could see the tool is showing serial port option. 

Meanwhile i will also check another bootloader option suggested by you.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Got some link to AVR2054 from my earlier queries 

Oh I see, the AVR in question is an ATXmega256C3 is it? It's true that might limit what bootloaders are available to you. The vast majority of existing examples are for tiny/mega not xmega. The three things that differ in Xmega are that (1) the actual UART interaction is necessarily different because the UART peripheral is different and (2) also the way a bootloader is placed is different, mega AVR have 4 places for a bootloader that eat slowly into the existing flash space depending on position choice while Xmega have one separate and fixed position for the bootloader code (which actually makes things a bit easier!) and (3) the way you write to flash is a bit different as the Xmegas involve a non volatile memory controller peripheral whereas mega just do it all via SPM and the Z register.

 

I guess if you have resolved the S19/SREC thing and AVR2054 has support for Xmega then you are probably better off sticking with that rather than considering a switch to something like OptiBoot+avrdude.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@clawson: Thankyou...i think your reply clears lot of thing for me. As you mentioned in point no. 2 in your reply, Xmega have one separate and fixed position for the bootloader code, i saw in ATXmega256C3 datasheet that this position is 0x40000 in this MCU, while main application is loaded from 0x00000. Does this mean when this MCU powers up, it directly executes main application instead of bootloader? if yes, then how will my bootloader get executed?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


PradeepPatel wrote:
Does this mean when this MCU powers up, it directly executes main application instead of bootloader? if yes, then how will my bootloader get executed?
This is what the "BOOTRST" fuse is for...

 

 

BTW did you realise that the 256C3 is a USB device and it would appear that by default it comes with a USB (Device Firmware Update - DFU) bootloader already pre-loaded in the bootloader section. So it may be (depending on whether you want to wire up the USB interface or not) that you don't actually need to do ANYTHING and you can simply use the DFU that is already there to deliver code into the Xmega - the PC side of DFU is a Java program from Atmel/Microchip called "Flip".

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

oh..ok..got it, so by setting fusebyte i can change the booting sequence. 

unfortunately we are not using USB for external interface so it is not wired up in hardware.