ISP by AT90CAN Development Board

Started by quaskar, February 06, 2013, 06:27:32 PM

Previous topic - Next topic

quaskar

Hello,

I tried to code my Olimex AT90CAN128-Module via ISP but I failed. Could it be that per initial  configuration of the module the ISP port is disabled (e.g. by disabled reset line)? Should it be possible to code that module via ISP right away by just soldering the 6 pins?

Would be nice if someone could give me a hint if I've a chance to code it via ISP.

Sebi

LubOlimex

#1
Hey quaskar,

It is possible to program the board with ISP programmer BUT it would require 10 jumper wires and a slight hardware modification. I have to warn you that modifying the hardware voids the warranty of the board and certain soldering experience is required. You decide whether you prefer to do a modification or purchase AVR debugger. Note that we have a capable debugger (but it works only with AVR Studio 4 – it does not work with AVR Studio 5 or Atmel Studio 6): https://www.olimex.com/Products/AVR/Programmers/AVR-JTAG-USB-A/.

The modification requires you to remove the U4 element - MAX232 – ST232(5V): .https://www.olimex.com/Products/AVR/Development/AVR-CAN/resources/AVR-CAN-sch.gif. Then you have to connect the ICSP signals according to the below arrangement (in the first column there are the ISP programmer pins and in the second there are processor pins of the AVR-CAN – track them to
which EXT connector they go in the schematic).

1 – 2 (PE0)
2 - +5V
3 – NC (Not Connected)
4 – GND
5 – 20 (Reset)
6 – GND
7 – 11(PB1)
8 – GND
9 – 3 (PE1)
10 – GND

The above has been tested.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

avr_tester

Hello,
i have the same problem, i want to use the ISP to flash.
But i don't understand why shall take for MOSI -> PE0 and for MISO -> PE1 ?

The specs for AT90CAN128 say:

PB3 MISO (SPI Bus Master Input/Slave Output)
PB2 MOSI (SPI Bus Master Output/Slave Input)

And PB3 and PB2 are free, i don't need to remove the MAX232.
Why your recommandation are PE0 and PE1 with removed MAX232 ?

Best regards
Nebu

riodda

Quote from: avr_tester on July 24, 2014, 10:41:38 AM
Hello,
i have the same problem, i want to use the ISP to flash.
But i don't understand why shall take for MOSI -> PE0 and for MISO -> PE1 ?

The specs for AT90CAN128 say:

PB3 MISO (SPI Bus Master Input/Slave Output)
PB2 MOSI (SPI Bus Master Output/Slave Input)

And PB3 and PB2 are free, i don't need to remove the MAX232.
Why your recommandation are PE0 and PE1 with removed MAX232 ?

Best regards
Nebu
I had a problem similar to yours and i've tryed to make an adapter for use  the USB Tiny to program the AVR-CAN. Right now i had no luck, the reason might be that the SPIEN is turnet off.
Wuold be nice to have a confirmation from olimex about this.

dave-at-axon

As they have the JTAG port on the board, do you have a JTAG programmer handy?

With this you can read the fuses and see if the ISP is enabled? It would seem strange that it was not.

Which lines did you connect for ISP? You need MOSI, MISO, SCK and RESET. These are the only lines you need to get ISP working. There is no need to remove any MAX232 as this is not connected to the ISP lines.

The only issue that I can see is that the RESET line may not operate with the precise timing needed by the ISP because of the MCP120 but in theory, it should not affect the operation of the reset line from the ISP programmer. As long as C8 is not fitted, things should work. I've seen issues with Arduino and ISP when the cap on the reset line was fitted. According to the schematic, NA should mean it was not fitted.


PS... The JTAG ICE3 is well worth the investment if you are doing a lot of work with the AVR devices. Being able to debug in real time on the target will speed up your debugging and programming time immensely.

riodda

Quote from: dave-at-axon on August 04, 2014, 05:35:55 AM
As they have the JTAG port on the board, do you have a JTAG programmer handy?

With this you can read the fuses and see if the ISP is enabled? It would seem strange that it was not.

Which lines did you connect for ISP? You need MOSI, MISO, SCK and RESET. These are the only lines you need to get ISP working. There is no need to remove any MAX232 as this is not connected to the ISP lines.

The only issue that I can see is that the RESET line may not operate with the precise timing needed by the ISP because of the MCP120 but in theory, it should not affect the operation of the reset line from the ISP programmer. As long as C8 is not fitted, things should work. I've seen issues with Arduino and ISP when the cap on the reset line was fitted. According to the schematic, NA should mean it was not fitted.


PS... The JTAG ICE3 is well worth the investment if you are doing a lot of work with the AVR devices. Being able to debug in real time on the target will speed up your debugging and programming time immensely.

I've ordered a simple chinees JTAG ICE MkI since i don't dovelop so much on non arduino AVR. i made this adapter
https://dl.dropboxusercontent.com/u/12305643/Adattatore.jpg
but i've just realized that i soldered it wrong so i will have to re check the wiring and test again while i wait for the JTAG to arrive from china.

zottel

#6
Quote from: LubOlimex on April 29, 2013, 09:58:18 AM

...remove the U4 element...
Thank you Lub0limex.
After reading your post, I just did the following and it works for me:
1.Instead of removing U4, I followed the trace from pin 15 of EXT1 to a via near R13. I cut I there, thus disconnecting U4. It is easy to either fix the trace or place a jumper there.

Next I used 6 pin ISP connector of STK500, so there are only 6 wires including supply voltage.

I had to reduce ISP frequency to 4KHz to make it work.
Later I found it did not work reliably. I cut the trace from pin 14 of EXT1 to pin 11 of U4 too (also before a via on bottom side).
Now it works up to highest ISP frequency.