AtTiny816 UPDI Programming using Arduino Nano

Hi,

I have programmed jtag2updi (GitHub - ElTangas/jtag2updi: UPDI programmer software for Arduino (targets Tiny AVR-0/1/2, Mega AVR-0 and AVR-DA/DB MCUs)) to my Arduino Nano. I have connected D6 pin from Arduino Nano to UPDI pin on my AtTiny816 stemma qt seesaw breakout board using 4.7k inline resistor. Also, I have connected 10uF cap between reset and ground pin of Arduino Nano.

But when I try to program ATTiny816 seesaw board, I am getting following error:

An error occurred while uploading the sketch

avrdude: jtagmkII_initialize(): Cannot locate “flash” and “boot” memories in description
avrdude: jtagmkII_program_enable(): bad response to enter progmode command: RSP_ILLEGAL_MCU_STATE
avrdude: jtagmkII_program_enable(): bad response to enter progmode command: RSP_NO_TARGET_POWER

avrdude: jtagmkII_read_byte(): bad response to read memory command: RSP_NO_TARGET_POWER
avr_read(): error reading address 0x0000
read operation not supported for memory “signature”
avrdude: error reading signature data for part “ATtiny816”, rc=-2
avrdude: error reading signature data, rc=-2
avrdude: jtagmkII_program_disable(): bad response to leave progmode command: RSP_NO_TARGET_POWER

Could you please help me go past this error?

thanks

1 Like

Hi @Abhishek44927
Welcome! Good to have you with us.

Can you clarify that you are using avrdude 6.3?
Sometimes this is the cause for bad signature data (missing boards specs in there rainbow table).
:slight_smile:

1 Like

Hi @Pixmusix,

Thank you for your prompt response. I am using Arduino ide 1.8.13. And I believe I am using avrdude version from Arduino. How can I check my avrdude version?
Sorry I am new to this.

Thanks.

I have installed megaTinyCore from Spence Konde version 2.6.10 and selected ATTiny816 chip under Tools.

HI @Abhishek44927 - can you provide

  • a quick sketch of how everything is connected?
  • and a photograph?
  • a screenshot of the Tools settings you have selected for the target device

As a sanity check, the target device ATtiny816 is powered when you attempt programming, right?

Hi Micheal,

Thanks for you response. Please see the sketch of my connections below:

I will share the image shortly of my breadboard with these connections.

Screenshot of Tools Settings:

I appreciate your help.

Thanks.

Arduino IDE v1 uses Avrdude 5.5 which I recon is probably fine. :slight_smile:

in that case… we better step through


:confetti_ball: :partying_face: PixMusix’s DERP List for ATTiny boards™ :confetti_ball: :partying_face:

1. Are you programming it using the “Upload using Programmer” feature?

Screen Shot 2024-01-22 at 8.51.22 pm

2. Is the directory of your programmer (for you jtag2updi) in the same PATH as your arduino IDE source folder?

3. Have you prayed to * LogĂ­a * the Greek Goddess of Coding and probably also Caffeine?

image

4. Are you sure the Bootloader of your Tiny is actually listening? Did ya hit the button? Is the LED flashing?

5. Does your Arduino and your Tiny board share a common ground.

Pix :heavy_heart_exclamation:

1 Like

Hi Abhishek
Don’t know anything about what you are trying to do.
BUT what is the 10µF cap on the reset pin supposed to be doing. Does the Arduino Nano have a reset button? If so this pin is probably connected to that and the cap might be upsetting the operation.

Pix says

Would he be referring to the reset button by any chance?
Cheers Bob

When the Nano is being programmed from a serial adapter, DTR is tied to RST through a low value capacitor, and RST has a high value capacitor to GND. When DTR goes low this puts a low pulse on RST. This enables the IDE to reset the Nano at the end of programming. The connection is usually built-in to the adapter. OP hasn’t shown the connection from PC to Nano, so it is not clear whether it is being used like this in this case. Hence the question about hitting the button.

2 Likes

Hi @Pixmusix,

Thank you for your response and steps with nice visualisations.

Below is the image of my connections between Arduino Nano and ATTiny816 seesaw board:

  1. I am programming using the “Upload using Programmer”.

  2. I have copied all the files inside “source” to a new directory called “jtag2updi”

  3. I tried praying to “Logia” but still no luck.

  4. I dont think bootloader of my Tiny is listening. I dont see blue LED flashing. I have steady green led on as shown in the pic above.

  5. Ground is shared between my Tiny and Arduino.

Complete error message:

Also, I have tried using latest avrdude and same error:

Thanks for helping me out with this.

1 Like

Hi @Abhishek44927
This is my fault, I was wrong here. :man_facepalming:
The Seesaw doesn’t have a boot-loader which is why your using a UDPI in the first place. (my bad!)

It does however have memory allocated for the bootloader and flash for the perifpherals which is what your error message is complaining about.
As to why that is I’m not sure because the Docs say that :

The Arduino IDE will automatically set the correct [Microcontroller unit] model and F_CPU (clock-speed)

My next step would be to post the error information you’ve provided here to a new issue on the jtag2udpi github repository.

I’d want to know what IDE setting or compiler flag I need to help my udpis find the correct memory locations. :slight_smile:

Super frustrating mate. Seems like you’re doing everything right. :man_shrugging:
Good luck, and don’t hesitate to keep us updated or ask more questions
Pix :heavy_heart_exclamation:

3 Likes

Hi Jeff
Thanks for that. Cleared that up.
just thought it might have been the case of throwing capacitors at anything that might seem to need one. Often the case here but can have some pretty unpredictable results sometimes if done in a seemingly random manner.
Cheers Bob

2 Likes

I wouldn’t know anything about that… :man_facepalming:

1 Like

I was able to make it work with serialupdi programmer

3 Likes

:partying_face: :partying_face: :partying_face: :partying_face: :partying_face:

1 Like

Hi Pix

You might not but over the past few years I have been involved with this forum there are quite a few that do.
Cheers Bob

2 Likes

Oh I am absolutely guilty of “go-go-gadget random components”

remember that one time you taught me about passive op amps? I was a mess :man_facepalming:

1 Like

Hi Pix
Yes, remember that one. Pleased you had some success and acquired some knowledge out of it. It is pretty fascinating at times. I think because you can’t actually see anything happening in the way of little electrons and “holes” buzzing around.
Cheers Bob

2 Likes

Hello, can you explain how did it work i had the same error but with avr128DA28 and arduino uno as updi

Hi @Mahmoud270226 - can you show the board settings you’ve selected in the Tools menu?

1 Like