Home › Forums › TinyG › TinyG Support › Board Reset/Profile Change
- This topic has 7 replies, 2 voices, and was last updated 13 years ago by alden.
-
AuthorPosts
-
October 22, 2011 at 11:49 pm #1452rainbow_lazerMember
Hi guys, I’m finally getting set up here in LA. I’ve got a TinyG running my DIYLILCNC, and I’m hitting a couple snags getting the board tuned correctly.
I’ll follow up with more specific questions later, but for now I’m wondering if there’s an easy way to restore the board to its default configuration, or to make separate profiles so I can try out different settings? Thanks,
Chris
October 23, 2011 at 8:35 am #1453aldenMemberChris, Glad you are getting things up and running. The best thing to do at this point is to upgrade your firmware to the latest rev. There has been considerable work on various sections of the code. I’m planning on posting an update on the github later today with the latest. This will also restore “factory” settings. Do you do have one of the Atmel AVRISP mkii programmers? I can’t remember.
At the current time there is no simpler way to restore the default settings, but it sounds like it would be nice to have a way to do this. Also, supporting multiple profiles is on the list, but not started. The data structures were designed for this, but I just haven’t implemented it yet.
What I’d like to do is generate a set of defaults for the DIYLILCNC and include it in the machine profile .h files with the source code. At the least I could walk through your config and help come up with the right settings.
I’ll be around today so you can get me on G+ or email and we can arrange a chat/call/hangout to walk through things if you like. – Alden
October 24, 2011 at 12:03 am #1454rainbow_lazerMemberAlden, thanks, I figured that was probably the case. I’ve had a string of faulty AVR programmers lately, and a new one that’s waiting to get soldered together… guess this is a good excuse to assemble it.
I like the idea of a DIYLILCNC default config… I’ll keep you posted as I tune my board after updating.
October 24, 2011 at 8:22 am #1455aldenMemberChris, You will need the Atmel AVRISP mkII programmer or some other programmer that supports Atmel’s PDI protocol. The AVRISP programmer is available on Mouser for about $35. I thought we got you one – or you got one back when you were working on the sculpture with Taylor. I know he was able to program the board, so between you two you have one.
November 1, 2011 at 12:38 am #1456rainbow_lazerMemberalden, thanks, I’ve got an mkII, but for some reason I’m having trouble flashing the board. I can connect to the programmer via avrdude when it’s attached to an arduino, but when I try to connect to TinyG, I get this error message:
root@lilcnc-desktop:# avrdude -c avrispmkii -p x256a3 -P usb
avrdude: stk500v2_command(): error in CMD_XPROG_SETMODE: Unknown
avrdude: stk600_xprog_program_enable(): CMD_XPROG_SETMODE(XPRG_MODE_PDI) failed
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.avrdude: stk500v2_command(): error in CMD_XPROG: Unknown
avrdude: stk600_xprog_program_disable(): XPRG_CMD_LEAVE_PROGMODE failedavrdude done. Thank you.
This is consistent on Windows 7 & Ubuntu Linux.
I’ve done some investigating online, and it sounds like I may need to update the mkII’s firmware via AVRstudio? Trouble is, I installed the libusb drivers on Windows, and it seems like they’re interfering with AVRstudio as it can’t connect to the board.
I’ll try again tomorrow on a different machine. Thanks!
November 1, 2011 at 6:28 am #1457aldenMemberThe Arduino and TinyG run 2 different chip families and programming protocols, so the avrdude command lines will be different. The xmega on TinyG runs the PDI protocol, which is why a garden variety atmel programmer won’t cut it and the mkii is needed. If you just bought it it’s unlikely that you need to upgrade your firmware, so you should probably save that as a last resort.
Riley’s written up the AVRdude settings and instructions for programing from Linux here. Check the settings in the Ubuntu section.
http://www.synthetos.com/wiki/index.php?title=Installing_TinyG
It looks like you have the settings right, though. Did you work from this example? Also, your board may have an xmega 192 instead of a 256. Try changing that setting to the 192 if so.I’m not really familiar with these as I always use AVRstudio4 to get my work done. If you haven’t done this already I’d recommend bringing up AVRstudio4 on your windows box and working from there. The IDE is a bit 1999, and it is Windows, but it works very reliably for me. I tried AVRstudio5 when it first came out but it had some bugs – especially in the programming sections. So I stuck with 4. It may be time to try 5 again.
I hope this helps – let us know how it goes.
November 1, 2011 at 5:04 pm #1458rainbow_lazerMemberYes, thanks! AVRstudio 4 on a different windoze box did the trick!
November 1, 2011 at 5:53 pm #1459aldenMemberGlad it worked. AVRstudio4 is one solution, and I’d really like the native AVRdude to function as well. Additionally, I have ported the xboot project onto the board so there’a a native xmega boot loader over the USB port, but I’m not happy with the way it works yet so I haven’t released it. It functions well once it’s connected, but you have to try multiple times for it to connect – so it’s ultimately not as reliable as it should be. Hopefully this will provide a better solution in time if I can work out the details.
-
AuthorPosts
- You must be logged in to reply to this topic.