AVR-mk2 Programming problems

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

Hello all, I am not sure that this is in the correct section so feel free to move it if necessary. I am currently attempting to program an ATmega2560 chip that will be driving a wheelchair. key word "attempting". So when I open up Atmel Studio (using 6.1 specifically because of our project manager) I connect the olimex mk2 programmer via usb cable and it pulls up and reads when I go to the pulldown menu for "tools". I press apply then attempt to "read device" and it gives me an error of "cannot enter programming mode". Now this is my main problem. I want to be able to read the device so that I can flash a program onto the chip so we can replace the one that messed up. 

 

Steps I've taken to solve the problem:

1. Go through olimex data sheet and follow their FAQ and debugging problems that include downloading atmel flip and manually updating the drivers.

2. checked continuity between all of the connectors from the chip to the pins

3. Check continuity between cables and connectors for olimex programmer

4. Jumper wired the programmer to a breadboard and connected it directly to the chip via MOSI MISO RST SCK VCC GND. grounded all 4 pins of the chip. powered 1 Vcc. (maybe i need to do all of them but I read you only need one)

5. Made sure chip was getting power

6. tried to read old chip by manually setting it up at well and still wouldn't read

7. Soldered another processor to a breakout board to see if it was the processor (still nothing)

 

So all of this yielded nothing. One concern may be the configuration of the manual connection to the chip regarding the reset pin, but at the moment I'm kind of lost to what my next step needs to be... buy a new programmer and try again? I am not sure. I have access to a pemicro Cyclone Pro programmer, but have no clue how to use it if that is a possible solution. Please let me know what yall think. Thank you for your time.

 

Attachment(s): 

-E.E @ Texas A&M '17

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

Aggie4Lyfe wrote:
powered 1 Vcc. (maybe i need to do all of them but I read you only need one)

 

Don't believe what you read on the internet, ALL vcc and avcc pins must be powered, each should have a 100nf bypass cap as well.

 

bread boards are not the best solution, but can be made to work.

keep leads short,

chip must be powered, programmer does not supply it, but must see it to work.

you must be able to read the device signature, if not, do not attempt any programming!

 

try again following the above guidelines and report progress.

 

Jim

 

 

 

 

Keys to wealth:

Invest for cash flow, not capital gains!

Wealth is attracted, not chased! 

Income is proportional to how many you serve!

If you want something you've never had...

...you must be willing to do something you've never done!

Lets go Brandon!

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

I have set everything up the way you say. Sadly my partner ran away with the computer that it was working on and won't be back till late tomorrow. I have downloaded 6.2 onto my desktop, but I cannot get the AVRISP mkII to work with my computer. When I have it plugged in, the light is steady green. I have tried downloading the drivers from olimex via. their website and updated them based on their instructions and it states that it is connected and "working properly". But when I attempt to go into Atmel Studio, open up device programming, I am able to view and select the mkII programmer and my 2560 chip.

 

When I press apply it gives an error message of "Unable to connect to tool AVRISP mkII (000200212345)"

Severity:        ERROR
ComponentId:    20100
StatusCode:    1
ModuleName:    TCF (TCF command: Tool:connect failed.)

Read from USB device endpoint 130 failed: HCD: Transfer submitted to a stalled endpoint (0xc0000030).

 

I then looked at olimex's website and followed their procedure through Atmel Flip to download the drivers manually. I first attempted to update the drivers to the specified "usb" folder, but it gives me a response saying that "your device already has the latest drivers installed". I said alright and went onto the next step to "open a usb connection" and it gives me this. **see attached** Says the port is not able to open. So how do I resolve this issue if you have any idea? 

 

Attachment(s): 

-E.E @ Texas A&M '17

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

So update. We finally were able to read the device signature of our chip. Once that showed up **we discretely jumped up in joy and high fived, not drawing any attention at all to ourselves in a quiet lab** we then proceeded to change the fuses to my desired values and went to click program. Then it fails and reads an error message saying "cannot complete command due to failure of a previous command" or something similar. Then all of a sudden the device signature is gone and I attempt to read it again and we get the dreaded error of "Cannot enter programming mode, continue to pull your hair out". Then we wern't able to read the device signature at all again. This has happened twice on two different occasions now. My assumption is that when we are attempting to program the fuses, something is happening that is causing the chip to "get out of programming mode" or "reset" or "play hide and seek". Keep in mind this is our first attempts at connecting this up and we are hoping that this is a simple fundamental mistake that we are overlooking. Hopefully this information sparks a solution for someone. Thank yall for your help.

-E.E @ Texas A&M '17

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

What is the ISP clock? (You probably want to use something that not higher than 125kHz for fuse programming.)