STK600 ISP to Program AT90CAN128

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

Hi All,

 

I'm trying to program some AT90CAN128s using the STK600 along with the STK600-RC064M-9 routing card and STK600-TQFP64 socket card using ISP.

I constantly get the standard ISP error when trying to program the chip (see attached).

I can program the chip using JTAG, but ISP is the preference for our production (6-pin header on board).

 

I have enabled the VTG to be 5V and both the VTG and RESET Jumpers are in place.

I have tried removing the AREF0 and AREF1 jumpers but this has no affect, i checked the documentation and AREF does not affect this routing card.

I did a continuity test on the ISP header and the pins on the processor and these are also correct.

I checked the voltage levels, where i did notice that Vcc is 4.95V but RESET is 4.63.

 

As another test i connected the STK600-ATMEGA2560 card and i could program that through ISP using my jumper and power settings.

I even connected a Atmega328P using STK600-RC032M-29 routing card and STK600-TQFP32, and i could also program it using ISP and the same setup.

 

Has anybody seen this issue with the AT90CAN128 before and know of anyway of fixing it?

 

I am using AVR Studio 4.18, this is again a preference for our production.

 

Thanks,

Pat

 

 

 

Attachment(s): 

This topic has a solution.
Last Edited: Mon. Feb 19, 2018 - 04:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Image of the .png above

 

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

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

Thanks Larryvc.

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

Does anybody have any experience with this?

 

Thanks,

Pat

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

No experience with the CAN chip but what is your ISP clock speed? Is the chips brand new or already programmed? Has ISP been disabled on that chip via JTAG?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Hi John,

 

I am using an 16MHz crystal in the socket on the stk600 and have the clock select switch set to XTAL.

 

I have changed the ISP speed a few times (all well below 4MHz, i usually use 200KHz) with no affect.

 

I was concerned that maybe my setup was the issue (prob still is), that's why i ran the tests on all other stk600 daughter boards that are available to me.

 

The chips are brand new, I even tried programming a few through JTAG and then tried reprogram with ISP and this still didn't work.

 

When i connect through JTAG, both the JTAGEN and SPIEN fuses are set on the AT90CAN128 by default.

 

The only thing with the AT90CAN128 which is different to other AVRs that i used is that the MOSI and MISO pins marked on the datasheet are not used for ISP programming, instead PDO and PDI  pins are used.

But i checked the connections between the connector and the processor and these are correct.

 

Thanks,

Pat

 

 

 

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

the MOSI and MISO pins marked on the datasheet are not used for ISP programming, instead PDO and PDI  pins are used.

That's normal for that family like the older M64 and M128. If the programming socket is designed for that chip family then it should be OK.

I see that the MC link to the device list for the routing card is broken. sad

 

Do you have another programmer you could try ISP to the chip on your board?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Surely a CAN128 is pretty much a Mega128 with CAN peripherals.

 

You can use JTAG.    Even a $10 Chinese JTAGICE-1 clone works with M16,M32,M64,M128,CAN128.

Or you use ISP on the DO/DI pins.

 

Since all CAN128 are SMT,   you are going to assemble the pcb before programming and test.   i.e. via 3x2 ISP header or 5x2 JTAG header on the target pcb.

 

You might find it convenient to develop code on a STK500 or STK600.    The STK600 can program via ISP or JTAG.   You need an external JTAGICE / ATMEL-ICE to do any JTAG debugging.

 

Anyway,   if your STK600 is having a problem,   check your routeing cards are well installed.    It is unlikely that you lose ISP and JTAG at the same time.

 

David.

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

It is unlikely that you lose ISP and JTAG at the same time.

Good night at the pub? wink JTAG works, ISP doesn't. See #6.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

No, I was not at the pub. I suspect that there is a problem with the routeing cards.
.
The normal problem with ISP and M128 is due to external electronics on the RXD0 pin e.g. MAX232.
I would imagine that the STK600 cards provide jumpers to isolate RXD0 e.g. the default Serial UART.
.
The STK600 is about 10 years old now. If there is a design problem we would have heard by now.
.
David.

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

I would imagine that the STK600 cards provide jumpers to isolate RXD0 e.g. the default Serial UART.

You may have something there, the adaptor board schematic doesn't show any but it may be elsewhere on the STK600.

 

edit yep the "RS232 spare" connector should not have anything on it. So if the STK600 has been used with the RS232 connected that should be removed.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Last Edited: Fri. Feb 16, 2018 - 07:36 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

Surely a CAN128 is pretty much a Mega128 with CAN peripherals.

 

You can use JTAG.    Even a $10 Chinese JTAGICE-1 clone works with M16,M32,M64,M128,CAN128.

Or you use ISP on the DO/DI pins.

 

Since all CAN128 are SMT,   you are going to assemble the pcb before programming and test.   i.e. via 3x2 ISP header or 5x2 JTAG header on the target pcb.

 

 

Hi David,

 

Thanks for the reply.

 

Our production boards do have the 6 pin spi header on them.

 

We use the STK600 to program the AT90CAN128 off board and then send the programmed chips to the far east for assembly.

 

This is why i want to keep the batch file for programming the same (on and off board) as to not cause confusion in production.

 

In my opinion, if i cant program through isp due to hardware on the rs232 spare connector that is a design flaw or at least it should be mentioned in the documentation.

 

js wrote:
Do you have another programmer you could try ISP to the chip on your board?

 

Tried connecting my avrisp mkii to the isp connector of the stk600 with same results.

 

js wrote:
edit yep the "RS232 spare" connector should not have anything on it. So if the STK600 has been used with the RS232 connected that should be removed.

 

Nothing on the spare rs232 connector, so might need to lift some components off the stk600.

Of course, the fact that the stk600 schematics are not published will make this awkward.

 

 

Last Edited: Fri. Feb 16, 2018 - 09:28 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do you have any external electronics on the RXD0 pin e.g. MAX232 or FTDI chip?

 

This will be your design problem.    I am sure that the STK600 will have a jumper arrangement to connect / disconnect the AUX Serial.

On the STK500 you have to add physical jumper leads to connect to AUX RS232.

I have never used the M128 daughter board on a STK500.

My STK600 died years ago.   I would never choose an STK600 again.

 

I suggest that you fix any hardware problem.   e.g. place a 1k0 series resistor between FTDI and RXD0.

This will mean you can ISP after assembly.

 

This will solve your Intellectual Property concerns.    I am sure that you have 100% confidence in your Chinese Assembly House.

But if you want the Assembly House to do QC testing,    you give them a non-sensitive testing HEX file.

 

If you have production runs in 1000s,   ask the Distributor to program the chips.

I really don't think it is practical to manually program large numbers of CAN128 chips in a clamshell socket.

 

Post-assembly ISP programming and diagnostic test procedure would be just like every other product that uses a microcontroller.

 

David.

Last Edited: Fri. Feb 16, 2018 - 09:45 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi David,

 

No i haven't connected anything to the stk600 bar the daughter cards.

I'll check now to see if I can isolate it using jumpers or maybe beep it back to the max232 chip which is on the stk600 if not.

 

Just to clarify, there is no issues programming the processors when they are on our boards, we use a avrisp mkii for this.

 

The issue only arises when the stk600 is used to program chips off board before assembly.

The stk600 is being used as a glorified socket to program the AT90CAN128.

I must say it is great for this as we can program pretty much any chip by changing daughter cards.

 

Production runs are not high enough yet to warrant distributor programming but it is something i have been trying to push.

 

I am trying to keep everything the same for production as to not allow or at least limit any chance of human error, hence i would like to stay clear of JTAG as the ISP on the stk600 works with the other chips we program off board.

 

Thanks,

Pat

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

Just checked the RS232 spare and nothing is attached.

 

I can beep the RXD pin to the MAX3380 by the DB9 connector but it does not connect back to the processor without any jumper wires.

 

The TXD pin does not seem to be connected directly to the MAX3380, i wonder is it going through some extra driver circuitry.

 

Either way it doesn't appear that the RXD or TXD lines are connected to the processor without using the 2 wire connector, none of which i have on my board. 

Last Edited: Fri. Feb 16, 2018 - 10:37 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

To use the RS-232 interface, the AVR deviceʼs UART pins must be connected to the appropriate pins on the “RS-232 SPARE” pin header. Use a 2-wire cable to connect the AVR deviceʼs RXD and TXD pins to the pin header. The “RS-232 SPARE” pin header is found in the target header section, while the DSUB marked “RS-232” is located on the other end of the card.

 Make sure that your 2-wire cable is removed.

 

David.

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

david.prentice wrote:
Make sure that your 2-wire cable is removed.

 

I don't have any 2-wire cables connected to the stk600

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

For interest sake i found my old DVK90CAN1 board and connected it to the STK600 using the ISP connector (see below).

 

I can successfully program the AT90CAN128 on the DVK90CAN1 board using the STK600 ISP.

 

Really starting to think there is a hardware issue on the STK600

 

Last Edited: Fri. Feb 16, 2018 - 01:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess what David is saying is: does your board use PE0 and PE1 for anything? If so you need to isolate those pins when programming.

 

Even a simple 1K resistor in series with other peripherals would solve the problem. ie programmer signal go directly to the programming pins, everything else is trough a resistor.

 

Some programmers (most??) will not be able to drive PE0 correctly if that's connected to a driver chip like an RS232 chip.

 

HOWEVER that does not explain why you can't program the chip standalone on the STK600 if nothing is connected to the "RS232 spare" pins as the picture shows.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

The photo in #18 does not look as if it is the correct shape.   It seems too narrow and too tall.

 

There appears to be jumpers on a RS232 SPARE header near LED1 at the bottom right of the board.

I would remove the RXD jumper during ISP programming.

 

You are a brave company if you intend to program more than a handful of CAN128 chips.

I can't see an STK600 surviving for a whole morning.

And you would have to visually inspect the jumpers, routeing boards,   securing keys, ... before you let a student near it.

 

Whereas you can set up robust test jigs for completed pcb board programming and test.

 

I can't find a clear human-readable photo of the STK600 board on the webdoc: https://www.microchip.com/webdoc/GUID-EE00BF20-2F37-4A8A-B685-B91173F8915D/index.html

 

Thanks to the weird photo in #18,  at least I can guess about the board legends.

 

David.

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

Sorry David,

 

But I don't understand why your are questioning the approach rather than focusing on the issue.

 

The STK600 is 100% an Atmel board! If you compare it to your picture you can see that all the connectors on the top are the same and have the same spacing.

Therefore it cannot be too thin, Standard DB9 connectors, DC jack etc!!

 

Also, again, there is no jumpers connected to board.

 

I am assuming that you must have some connection to Atmel seeing as you are being so defensive of the board, if so could you try the same setup.

If you are not employed by Atmel, then of course i don't expect you to double check my work.

 

Thanks,

Pat

 

 

 

Last Edited: Mon. Feb 19, 2018 - 09:59 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My apologies.   I had only viewed your JPEG on a Samsung Tablet (in portrait mode).

If I rotate the Tablet to Landscape mode,  the JPEG appears in real-life geometry.   And is quite readable.

 

So I accessed #18 on my Desktop PC running FireFox.    Yes,  the JPEG is narrowed on the PC too.    However if I right-click View Image,   I get a real-life geometry.   And can even see a magnified view if I click on the + icon.

 

Yes,  I can see that the RS232 SPARE header is unpopulated.    So my theory about RXD0 and DI conflict on PORTE.0 does not apply.

I can only suggest that you disconnect the STK600 and trace the ISP connections with a DMM.   i.e. one probe on the PE0 pin of the TQFP-64 and one probe on the MOSI pin of the 3x2 ISP header.

 

Check all the ISP connectivity.   i.e. for all 6 pins.    There is obviously a problem with the routeing cards.

 

No,  I do not work for Atmel.    The one STK600 that I owned died almost immediately.   I will never buy an STK600.

I have owned a STK500 for about  10 years.    It works just fine.

 

I was trying to be helpful from a commercial point of view.    i.e.  practical procedures for product programming and test.

If it turns out that your STK600 does have a connectivity / routeing problem,   this is an even stronger argument to keep the STK600 away from production staff.

 

Of course you might find the STK600 convenient for JTAG debugging.    And you can make your own choices for how you use the STK600.

 

I am quite serious about RXD0 / DI conflict.   A 1k0 resistor in MAX232 line solves the conflict.

 

David.

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Hi David,

 

I appreciate the advice, just getting a little frustrated with the issue.

 

I beeped the board again today with my DMM and noticed the Reset line connection seemed a bit flaky (no constant beep).

 

I could trace it back no problem from the routing card to the connector, but not form the socket back.

 

On inspection (under a scope) of the socket board connector i noticed there was some material underneath the compression pin.

 

I have since cleaned all connections with alcohol and now I can program through ISP.

 

The voltage level on the reset pin now matches the Vcc, i really should have focused more on the reset pin when i saw the difference between Vcc and Reset.

 

Thanks for all the help.

 

Regards,

Patrick

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

Well done on your issue relief.

pmcdonnell wrote:
Production runs are not high enough yet to warrant distributor programming but it is something i have been trying to push.
An alternative is microchipDIRECT "eventually" (?) for AT90CAN128 (assuming there's enough volume)

Could consider a burn-in socket on a custom PCBA for ISP.

An edge connector is one way to have a common interface to a custom PCBA.

 

AVR8 on Microchip Direct
https://www.avrfreaks.net/forum/avr8-microchip-direct

https://www.mouser.com/ProductDetail/Yamaichi-Electronics/IC234-0644-024-N?qs=%2fha2pyFadui57ksYdKrimNZAvsT8huciArb%2fQ4uNQR8wK7L9xflHj7NjH6dGnR2w via

Mouser Electronics

Yamaichi Test & Burn-in Sockets

https://www.mouser.com/new/yamaichi/yamaichiburnin/

Introducing Edge-Connect™ - The Direct to Literal Edge of the Board Connector - Tag Connect

http://www.tag-connect.com/EdgeConnectIntro

 

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

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

Thanks gchapman,

 

I see that processors are slowly been added to the list.

 

I will contact microchipDIRECT and see do they program the processors we use.

 

Thanks again,

Patrick