Welcome! Log In Create A New Profile

Advanced

Firmware for AVR32?

Posted by kkronyak 
Firmware for AVR32?
October 19, 2012 12:25PM
I have been digging around and haven't found much on this so I thought I might ask here. Most of my experience with AVR has been in the past, long before Arduino came out, and only recenly have I begun to get into electronics as a hobby again. I have been aware of the AVR32 platform for several years but don't have any hardware that runs on it or development boards to work with. I have noticed several mentions of MCU performance being a limiting factor in 3d printer speeds, so I was looking into ways to possibly replace or augment the MCU on the controller boards. It would seem to me that an easy win would be to mount a small 48-pin QFP / QFN AVR32 device on a pin-compatible break-out board that would fit the same 40-pin socket as the ATMega644P used in the Sanguino / Sanguinololu. If this could be done, it would offer up to 5x the processing power with a low cost upgrade board (probably under $15 in quantity).

The biggest barriers I could see to this would be that the 8-bit AVR runs at 5v while the AVR32 has a maximum voltage of 3.6V, so level converters or would be required as an interface between the 5v signals. Presumably ADC inputs (thermistor) would have to be voltage-divided in order to ensure the maximum value does not go above the ~3.3v MCU supply / AREF voltage.

The other barrier would be firmware of course. I have never worked with AVR32 but I am curious if anyone has experience with it, and/or has ported code from 8-bit to 32-bit AVR? It's not a challenge I'm not willing to take on, but trying to learn both the AVR32 platform at the same time as porting fairly complex firmware over is probably not the most ideal situation.

Has anyone thought of doing this? I think this could be an easy drop-in upgrade particularly for the Sanguinololu or Gen7 electronics.
Re: Firmware for AVR32?
October 20, 2012 06:25AM
I think the RepRap gods ( = a crowd always doing what "everybody" does) have decided only ARM chips are worthwhile winking smiley

That said, Teacup firmware is independent from Arduino IDE and porting it to other platforms is possible.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Firmware for AVR32?
October 21, 2012 10:52AM
Yeah I've noticed that ARM seems to be the trend. I think it's a good platform too, but I was thinking the AVR32 may be an easy upgrade path for people who are already using Sanguinololy boards. It seems like much of the firmware is dependent on Arduino functionality though which may not work well with porting to other platforms.

Another idea I was thinking of was to have a sort of hybrid controller which would have the direct hardware control (motor steps, thermal management) on one or more separate controllers. For instance, maybe have 3 small AVRs (such as ATTiny24) running at 20MHz -- one for command interpretation / calculation, one for thermal management, and one for stepper control, all connected in a daisy chain SPI configuration with the control device as the master. Even with SPI running at 1/2 speed (10MHz) you get about 10 megabits of throughput and since the SPI interface is hardware it doesn't use CPU cycles until a complete command comes through. The circuit complexity would be greater but it could potentially have a major cost reduction as long as the firmware could fit.

The next evolution of that would be having the separate hardware layers, but the host device being some high performance but non-real time device such as Raspberry Pi or Netduino. Raspberry Pi has SPI and as such even running Linux should be able to communicate with the AVRs at a high speed. Or maybe even run raw ARM firmware on the RPI, though I don't know what would be involved in that since apparently Broadcom has blocked out some functionality unless you use their binary Linux drivers. Netduino isn't nearly as fast as Raspberry Pi (and a little more expensive) but is somewhat more flexible as an electronics development platform.

Maybe I'm just rambling here, but I think coming up with an easily available and cost-effective solution, particularly if it can be retrofit to existing hardware, would be helpful. The idea of using SPI communications with a high speed host device may be viable on almost all existing electronics since virtually all of the existing controllers use some form of Atmel AVR, all of which have one or more SPI interfaces. Once I get my printer kit and sanguinololu I may have to try plugging my netduino into it and see what happens smiling smiley
Re: Firmware for AVR32?
November 16, 2012 02:17AM
arm is now officially supported by arduino team.

[arduino.cc] it is a Atmel SAM3X8E ARM Cortex-M3 CPU


The reason for seriousness of the arm processor is its rather advanced math.
Sorry, only registered users may post in this forum.

Click here to login