Go Down

Topic: New megaTinyCore for 1-series and 0-series ATtiny (like 1616, 3217, etc) (Read 3600 times) previous topic - next topic

DrAzzy

1.0.6 is now *actually* available. So much for getting 1.0.6 out way ahead of 1.1.0 so people didn't have to wait for fixes to the 1.0.6-fixed bugs while I got the bootloader stuff set up.

1.1.0 is essentially ready for release at this point. I have assembled 3216-based breakout boards with the autoreset circuit, bootloaded them with UPDI fused as reset, connected the solder pads to enable autoreset, and verified that you can program them over serial with the autoreset just like a normal part, and have them jump to app on POR rather than bootloader. And I can take a part without autoreset circuit, and load a different optiboot binary (with 8 second timeout and that runs on POR) and upload over serial by powercycling it, and still reprogram it freely over UPDI.

@kattiny1616 - Since I don't know the details of what you're doing, I couldn't say, but 200Hz doesn't sound crazy (though again, if you're doing tons of math, maybe?)

How are you talking to the bluetooth? Is it just a bluetooth serial module? If so, are you using it at a high enough baud rate to accommodate the data you want to send at 200Hz? This would be an easy gotcha, so thought I'd mention it.

ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

DrAzzy

Okay, 1.0.6 release *actually* works now.

1.1.0 will also be getting the Logic library for working with the new CCL peripherals (Configurable Custom Logic)
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

robjordan

Would it be ok to post here with a newbie question about bringing up an Attiny1614 for the first time? I'm struggling and could really use some help with understanding what is and isn't working.

I bought a few 1614s and a clone Arduino nano (I'm more experienced with ESP8266 and ESP32, so I know the Arduino IDE but actually haven't used Arduino hardware before). After a bit of a struggle I am able to load sketches reliably on the nano. It came with the 'old' bootloader, so I have to select that non-default option, and has a ch341 USB controller, which I understand is different from the genuine arduino). I have it directly connected to PC via mini-USB cable. I've run the IDE on both Linux and Windows 10. I've got the jtag2updi installed.

I soldered the 1614 onto a breakout board, it and the nano are on a breadboard, and I've triple-checked connections between Nano and the 1614 breakout legs:
Nano 5V -> 1614 Vcc
Nano GND -> 1614 GND
Nano D6 via 4.7k resistor to 1614 UPDI

I've got a 10uF electrolytic between Gnd (-) and RST (+) on the Nano.
I've got a 100nF ceramic across Vcc and GND on the 1614.

If I understand the sequence correctly, the next step is to set the board type to Attiny1614... and Burn Bootloader. After some healthy-looking output, and the 'Cannot locate "flash" and "boot"' (which I understand to be normal) I get the following error:

Code: [Select]
avrdude: jtagmkII_reset(): timeout/error communicating with programmer (status -1)
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: jtagmkII_close(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_close(): timeout/error communicating with programmer (status -1)

avrdude done.  Thank you.

Error while burning bootloader.


I've cut the avrdude command and run it from the command line with "-v -v" appended to get more detail, and I'm attaching that debug output.

I'm a bit lost on what (if any) communication is actually happening between the Nano and the 1614. Is the 1614 responding to anything, or is it completely unresponsive? What other debugging tips do you have. I know the answer is always 'check the wiring' and I'm happy to believe I've got something wrong but I'm a bit stumped right now.

Thanks very much in advance.
Rob

DrAzzy

I've had another report of this issue. I am currently investigating and will let you know if I am able to reproduce it.

Can you let me know what OS this is an issue on?
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

robjordan

I've had another report of this issue. I am currently investigating and will let you know if I am able to reproduce it.

Can you let me know what OS this is an issue on?
Assuming you are responding my post #32, I see this same behaviour on Windows 10 and Linux Mint.

Thanks

robjordan

I've done a bit more investigation using https://github.com/mraardvark/pyupdi. It's a bit easier for me to diagnose, because the recommended wiring setup loops Tx back to Rx and checks for commands echoed back. I can see now that the UPDI pin on the attiny1614 is remaining high during attempted serial transmissions, thus interfering with the echo of commands. I've checked for shorts between pins on the breakout board and there are none apparent to me. Maybe I've borked the chip... perhaps I'll try a second.

DrAzzy

Interesting. It's not reproducing for me with manual install on attiny1614 on windows. Maybe there's an issue with the toolsDependencies pulling in a bad version of avrdude?
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

DrAzzy

I'm not able to reproduce this issue with either manual or board manager installation.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

DrAzzy

megaTinyCore 1.1.0 released!

The moment we have all been waiting for it here - Optiboot support on megaTinyCore. Optiboot is supported on all parts, as a normal serial bootloader. It can be uploaded with the UPDI pin still set to reset (in this case, you unplug and replug to start bootloader), or with the UPDI pin set to work as reset so the standard autoreset circuit can be used. Warning: In the latter case, you can no longer program the chip via UPDI, including to return it to it's original state - an HV programmer is needed. Be sure you know what you're getting into when you load the UPDI-pin-as-reset version of the bootloader. Note also the version you get with UPDI as reset does NOT run after power on reset, only external and software reset, and only for 1 second. Ie, like a normal pro mini or similar.

This release also introduces some other new features:
* U(S)ART pin selection from the tools menu for parts other than the 8-pin ones
* The Logic library for interfacing with the built-in configurable custom logic (CCL) units. Fixing the examples so they work on tiny parts was deferred to 1.1.1.
* Enhanced pinout diagrams and documentation
* Fix mEDBG on ATtiny416 Xplained Nano
* Fix EESAVE option, which was backwards
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

DrAzzy

1.1.2 is coming out tonight to fix a few issues reported within the past two days (since the 1.1.1 release) - in 1.1.0, compilation for all parts in board manager was broken (but not in manual install version). In 1.1.1, compilation for 24-pin parts was broken due to a typo introduced in 1.1.1.

Edit: 1.1.2 is now out for both board manager and manual installation.
Edit2: board manager json was briefly broken. It is fixed now.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

BR87

hello, I find the subject very interesting, I tried to install  " jtag2updi " in an Arduino nano but I have an error message

C:\Users\CARPEN~1\AppData\Local\Temp\ccrQPW5r.ltrans0.ltrans.o: In function `main':

C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:43: undefined reference to `setup'

C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:46: undefined reference to `loop'

collect2.exe: error: ld returned 1 exit status


why?

1.1.2   installed

IDE arduino 1.8.10


thanks

pert

Unless you define your own main function (which I don't recommend), every sketch must contain a setup() and a loop() function. If you don't need any code in the function, you must still define it, but you can leave it empty.

DrAzzy

I think you probably didnt follow the instructions for jtag2updi?

It's a weird sketch - it is a classical c program with a dummy sketch as a shim so it can be built on arduino. See the readme.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

BR87

Ok ,I had not done this step   "Just copy all the files inside "source" to a new directory called "jtag2updi" inside your sketch main directory."

thanks



BR87

Hello, I'm having fun with my new attiny , I have a question, I use this chip to drive a motor with the PWM (attiny3216 PWM PC0 / 10), but the frequency is too low, I wanted to know if it was possible to change this frequency ?

thanks

Go Up