New optiboot; beta testers welcome...

Did someone get the Optoboot bootloader on an Atmel644P to work in the Arduino IDE?

I make an bootloader with the sanguino flag but this is not for the "P" variant of the Core, can someone help me?

My Sanguino came with a 644P, and the Makefile for optiboot does specify a 644P...

As far as I know, there aren't any bootloader or arduino-relevant differences between any of the P vs non-P atmega chips.

Try the Optiloader 4.5 that maniacbug has working for the '1284P.

May need to change the signature bytes for 644x vs 1284x. Not sure what file you'd do that in.

I believe the parts are only different in terms of memory size after that.

If you check with maniacbug maybe he can add your chip to the files.

Part Signature Bytes
ATmega164A 0x1E 0x94 0x0F
ATmega164PA 0x1E 0x94 0x0A
ATmega324A 0x1E 0x95 0x15
ATmega324PA 0x1E 0x95 0x11
ATmega644A 0x1E 0x96 0x09
ATmega644PA 0x1E 0x96 0x0A
ATmega1284 0x1E 0x97 0x06
ATmega1284P 0x1E 0x97 0x05

westfw:
My Sanguino came with a 644P, and the Makefile for optiboot does specify a 644P...

As far as I know, there aren't any bootloader or arduino-relevant differences between any of the P vs non-P atmega chips.

Interresting ist the second UART on the chips with the P on it.

They all have two uarts...

westfw:
They all have two uarts...

It was my understanding also the the non P 644 offered only one serial port?

Edit: Looked at the 644 datasheet and the cover page does seem to list one serial port:

http://www.atmel.com/Images/doc2593.pdf

Lefty

The currently available datasheets from last summer show 2 UARTs for '644A and '644PA

ATmega164A/PA/324A/PA/644A/PA/1284/P Summary
(file size: 595899, 33 pages, revision C, updated: 06/2011)

ATmega164A/PA/324A/PA/644A/PA/1284/P Complete
(file size: 24554094, 584 pages, revision C, updated: 06/2011)

I didn't look into these:

ATmega164P, ATmega324P, ATmega644P Automotive Complete
(file size: 6188428, 377 pages, revision F, updated: 09/2009)

ATmega164P/324P/644P Complete
(file size: 9613207, 439 pages, revision 0, updated: 07/2010)

ATmega164P/324P/644P Summary
(file size: 565743, 28 pages, revision O, updated: 01/2010)

CrossRoads:
The currently available datasheets from last summer show 2 UARTs for '644A and '644PA

ATmega164A/PA/324A/PA/644A/PA/1284/P Summary
(file size: 595899, 33 pages, revision C, updated: 06/2011)
http://www.atmel.com/Images/8272S.pdf

ATmega164A/PA/324A/PA/644A/PA/1284/P Complete
(file size: 24554094, 584 pages, revision C, updated: 06/2011)
http://www.atmel.com/Images/doc8272.pdf

I didn't look into these:

ATmega164P, ATmega324P, ATmega644P Automotive Complete
(file size: 6188428, 377 pages, revision F, updated: 09/2009)
http://www.atmel.com/Images/doc7674.pdf

ATmega164P/324P/644P Complete
(file size: 9613207, 439 pages, revision 0, updated: 07/2010)
http://www.atmel.com/Images/doc8011.pdf

ATmega164P/324P/644P Summary
(file size: 565743, 28 pages, revision O, updated: 01/2010)
http://www.atmel.com/Images/8011S.pdf

But there does exist a ATmega 644/V chip, which datasheet I posted before.

From cover sheet:

• Peripheral Features
– Two 8-bit Timer/Counters with Separate Prescalers and Compare Modes
– One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture
Mode
– Real Time Counter with Separate Oscillator
– Six PWM Channels
– 8-channel, 10-bit ADC
Differential mode with selectable gain at 1x, 10x or 200x
– Byte-oriented Two-wire Serial Interface
One Programmable Serial USART– Master/Slave SPI Serial Interface
– Programmable Watchdog Timer with Separate On-chip Oscillator
– On-chip Analog Comparator
– Interrupt and Wake-up on Pin Change

Lefty

Data sheet is no longer posted, am guessing that chip is no longer in production.

CrossRoads:
Data sheet is no longer posted, am guessing that chip is no longer in production.

I just downloaded it from the Atmel site 20 mins ago?

http://www.atmel.com/Images/doc2593.pdf

Where'd you find it? I went thru the list of 8/32 bit devices and didn't see that.

Looks like one can still get them:

but they cost more than the 2 UART parts:

And the 1284 with twice the memory is like 21 cents more:

CrossRoads:
Where'd you find it? I went thru the list of 8/32 bit devices and didn't see that.

Looks like one can still get them:
http://www.mouser.com/ProductDetail/Atmel/ATmega644-20PU/?qs=sGAEpiMZZMtkfMPOFRTOl8gKBbfUWfgv

but they cost more than the 2 UART parts:
http://www.mouser.com/ProductDetail/Atmel/ATmega644PA-PU/?qs=sGAEpiMZZMvllk5TiSMlD%2FzmzqUSIWNR

And the 1284 with twice the memory is like 21 cents more:
http://www.mouser.com/ProductDetail/Atmel/ATMEGA1284P-PU/?qs=sGAEpiMZZMtVoztFdqDXO3QpeG9FlGm9

Just went down this list: http://www.atmel.com/products/microcontrollers/avr/megaAVR.aspx

Found ATmega644 link
clicked on documents tab
There is then a summary and full datasheet pdf link

Lefty

Markus_L811:
Did someone get the Optoboot bootloader on an Atmel644P to work in the Arduino IDE?

I make an bootloader with the sanguino flag but this is not for the "P" variant of the Core, can someone help me?

As others have said, at least where the boot loader is concerned, Optiboot should run on the 1284P or the 644P, regardless of the number of UARTs. Did you get it to work?

Is it only downloading sketches where the signature becomes important?

Note that the optiboot hex file for 1284 will NOT work in a 644 (or at least is not expected to work), because the bootloader is located at the end of flash memory, and that's in a different place on the two chips. AVR code usually contains at least some absolute address references...

westfw:
Note that the optiboot hex file for 1284 will NOT work in a 644 (or at least is not expected to work), because the bootloader is located at the end of flash memory, and that's in a different place on the two chips. AVR code usually contains at least some absolute address references...

Bill, is this just a linker issue?

No, because it needs to know the internal address of the "Read While Write Flash" area in the source code as well (but the source already knows about 644p, so at least in theory if you can compile/link from source you shouldn't have any problems building a 644 version ("make sanguino")

However, the 644 version predates my involvement and hasn't been tested, so i don't know whether it works.

westfw:
No, because it needs to know the internal address of the "Read While Write Flash" area in the source code as well (but the source already knows about 644p, so at least in theory if you can compile/link from source you shouldn't have any problems building a 644 version ("make sanguino")

However, the 644 version predates my involvement and hasn't been tested, so i don't know whether it works.

Thanks Bill, I did notice the Sanguino option in the list of targets, but I have not tried it, and didn't look to see what changed. If someone wants to try Optiboot with Sanguino, I'll build it and post it.

westfw:
However, the 644 version predates my involvement and hasn't been tested, so i don't know whether it works.

Ditto here. Never tested it. If someone wants to send me a Sanguino, I'll make sure it works :grin:

the 644 version predates my involvement and hasn't been tested

Well, now it's been tested.

It doesn't work.

It has the wrong signature for an ATmega644p (it makes it look like an ATmega644.)
You can tell boards.txt that you have a 644 and upload will work, but then the pins_arduino.c doesn't get correct values.
(and why does it have an incorrect signature byte? Because avr-libc is actually wrong in the version that ships with Arduino. It's not even an optiboot bug. Sigh. AVR C Runtime Library - Bugs: bug #26188, Wrong or missing definition of... [Savannah]

It also has an incorrect efuse value in the Makefile (should be 0xFD, with the "unused" bits set to 1, but the makefile has 0x05)

http://code.google.com/p/optiboot/issues/detail?id=61