Code Monkey home page Code Monkey logo

Comments (14)

lincomatic avatar lincomatic commented on July 22, 2024

In theory, it should work, though I have not bothered to try it. What happens when you try to do it?

from at90can.

a4x4kiwi avatar a4x4kiwi commented on July 22, 2024

Thanks for the quick correspondence!

I get:
Binary sketch size: 3,568 bytes (of a 131,072 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x06

I am triple checking my reset circuit now with a scope, but it looks to be fine.

My test LED blinking program resets when programming is initiated.

Cheers,
Mal.

from at90can.

a4x4kiwi avatar a4x4kiwi commented on July 22, 2024

I have used a cap and a diode per http://code.google.com/p/avr-netino/wiki/AddAutoReset modified to suit the AVR-CAN board.

from at90can.

lincomatic avatar lincomatic commented on July 22, 2024

Two things you can try:

  1. try protocol=stk500 (probably won't work)
  2. try this high fuse setting:

at90can128.bootloader.high_fuses=0x1A

from at90can.

a4x4kiwi avatar a4x4kiwi commented on July 22, 2024

WAHOO. What a learning experience! It works. programming over serial. See the following updates.

LED changed in bootloader to suit Bravekit unit and aid debugging
#define LED_DDR DDRE
#define LED_PORT PORTE
#define LED_PIN PINE
#define LED PINE4

Correct settings in boards.txt: (Baud rate, maximum_size and fuse were incorrect above)

##############################################################

at90can128.name=AT90CAN128
at90can128.upload.protocol=arduino
at90can128.upload.maximum_size=122880
at90can128.upload.speed=57600

at90can128.bootloader.low_fuses=0xFF
at90can128.bootloader.high_fuses=0x18
at90can128.bootloader.extended_fuses=0xFF
at90can128.bootloader.path=at90can
at90can128.bootloader.file=ATmegaBOOT_168_at90can.hex
at90can128.bootloader.unlock_bits=0x3F
at90can128.bootloader.lock_bits=0xCF

at90can128.build.mcu=at90can128
at90can128.build.f_cpu=16000000L
at90can128.build.core=at90can

from at90can.

lincomatic avatar lincomatic commented on July 22, 2024

Thanks for the great work, I will update the distribution after I have tested it

  1. is the change above the only thing you changed in the bootloader?
  2. you said you modified the cap & diode to suit the AVR-CAN, can you tell me the exact mod you did to the circuit?

from at90can.

lincomatic avatar lincomatic commented on July 22, 2024

I tried this today.. instead of adding the circuit, I just erased the chip, so it would go to the bootloader. I was able to get the bootloader installed, but I always get compare error at 0x0000 when I try to burn a sketch. I am using the original hex file and your fuse settings above.

from at90can.

lincomatic avatar lincomatic commented on July 22, 2024

got it working now. Had to change makefile LDSECTION to point to where the bootloader section was set

from at90can.

a4x4kiwi avatar a4x4kiwi commented on July 22, 2024

I have only been able to program the boot loader via the AVR Studio using
an AVRISP or a DRAGON. the Arduino tools seem to fail. I will continue to
investigate.


email:[email protected]
mobile:0409 601 747


On 5 January 2013 09:07, lincomatic [email protected] wrote:

I tried this today.. instead of adding the circuit, I just erased the
chip, so it would go to the bootloader. I was able to get the bootloader
installed, but I always get compare error at 0x0000 when I try to burn a
sketch. I am using the original hex file and your fuse settings above.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-11901997.

from at90can.

a4x4kiwi avatar a4x4kiwi commented on July 22, 2024

Updated Lock bits. The original setting may have prevented the Arduino IDE from programming correctly. It programs with the Dragon and the avrisp

Someone should double check this. I have made them the same as the ATMega1280.
Also the maximum_size I have calculated (128k - 8k) differs from that of the Arduino ID entry for the Mega1280

I am not certain which is correct.

at90can128.name=AT90CAN128

at90can128.upload.protocol=arduino
at90can128.upload.maximum_size=122880
at90can128.upload.speed=57600

at90can128.bootloader.low_fuses=0xFF
at90can128.bootloader.high_fuses=0x18
at90can128.bootloader.extended_fuses=0xFF
at90can128.bootloader.path=at90can
at90can128.bootloader.file=ATmegaBOOT_168_at90can.hex
at90can128.bootloader.unlock_bits=0x3F
at90can128.bootloader.lock_bits=0x0F

at90can128.build.mcu=at90can128
at90can128.build.f_cpu=16000000L
at90can128.build.core=at90can

from at90can.

lincomatic avatar lincomatic commented on July 22, 2024

Actually, it worked OK for me w/ the old lock bits. But I have the hfuse set to 1E instead ... so that only 1K is wasted on the bootloader. See if what I checked into github works for you. I rebuilt the bootloader with LDSECTION=0x1FC00 to match my adjusted hfuse, so you'll have to burn my new one in before you test.

from at90can.

lincomatic avatar lincomatic commented on July 22, 2024

I just checked the AT90CAN128 datasheet. Actually, boot section unlocked should be lock=FF and boot section locked should be CF since the top 2 bits are fixed @ 1. But avrdude always reads the top 2 bits as 0. very strange. I guess I'll go ahead and use 3F/0F like you.

from at90can.

a4x4kiwi avatar a4x4kiwi commented on July 22, 2024

I was unable to program your boot loader using the IDE.( I can with AVR
Studio)
Looking at your output hex file it is &hFFEA-&hF800 = (dec)2026 bytes long.
This should fit with 2 k. Mine compiles to just a bit over for some reason.
Probably depends on GCC version.

The H fuse should be 1A for a 2k boot loader starting ant F800
Following is my section of boards.txt for your bootloader which works correctly.

aat90can128.name=[bootloader]AT90CAN128
aat90can128.upload.protocol=arduino
aat90can128.upload.maximum_size=133120
aat90can128.upload.speed=57600

aat90can128.bootloader.low_fuses=0xFF
aat90can128.bootloader.high_fuses=0x1A
aat90can128.bootloader.extended_fuses=0xFF
aat90can128.bootloader.path=at90can
aat90can128.bootloader.file=ATmegaBOOT_168_at90can.hex
aat90can128.bootloader.unlock_bits=0x3F
aat90can128.bootloader.lock_bits=0x0F

aat90can128.build.mcu=at90can128
aat90can128.build.f_cpu=16000000L
aat90can128.build.core=at90can


email:[email protected]
mobile:0409 601 747


On 5 January 2013 17:48, lincomatic [email protected] wrote:

I just checked the AT90CAN128 datasheet. Actually, boot section unlocked
should be lock=FF and boot section locked should be CF since the top 2 bits
are fixed @ 1. But avrdude always reads the top 2 bits as 0. very strange.
I guess I'll go ahead and use 3F/0F like you.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-11910896.

from at90can.

a4x4kiwi avatar a4x4kiwi commented on July 22, 2024

For anyone using the bravekit:

Install WINAVR

edit the boot loader C file LED definitions and follows

#define LED_DDR DDRE
#define LED_PORT PORTE
#define LED_PIN PINE
#define LED PINE4

from the command prompt in the boot loader folder type:

make clean
make at90can

This will create a new boot loader with the diagnostic LED functioning correctly.

from at90can.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.