Welcome! Log In Create A New Profile

Advanced

1M baud rate on ATmega1284p

Posted by marcosscriven 
1M baud rate on ATmega1284p
December 17, 2012 10:07AM
Just looking at section 17.2 of the ATmega1284P specs here [www.atmel.com]

It appears it should support 1M baud rate, 4x the default setting in my Marlin firmware. Is it safe to just change this and try it? Why is the default so low in the firmware?

My motivation is the slow upload speed to the SD card, and the desire to not have to keep popping it physically into my computer.

Marcos
Re: 1M baud rate on ATmega1284p
December 18, 2012 07:58AM
It is said uploading files isn't limited by the speed of the serial line, but by processing power. 250'000 baud should have a throughput of approx. 25'000 characters per second or 38 seconds/megabyte.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: 1M baud rate on ATmega1284p
January 16, 2013 05:07PM
I'm pretty sure it's safe to try this, you are always able to re-upload firmware no matter what the baud rate settings are. At worst a new 1284p is like £6 with bootloader.
Re: 1M baud rate on ATmega1284p
January 17, 2013 06:20AM
True. Trying different baud rates for the firmware doesn't influence the bootloader. You can upload a firmware communication at 1Mbaud with 115200 baud and revert it back the same way.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: 1M baud rate on ATmega1284p
February 03, 2013 04:33AM
Since the serial is CPU driven, if you upload at 1M you don't leave enough cpu cycles for other things, such as moving steppers or checking temp etc.

So you would be able to upload to SD faster, but it will probably break normal operations if you send from a computer.
Printing from SD might/should be fine.

This is why I like the AT90USB1286 based boards, it is a virtual UART, so no mater what baud you set it to, it uploads at max speed it can (chip also has on board buffer, so cpu doesn’t get swamped)
Re: 1M baud rate on ATmega1284p
February 03, 2013 05:42AM
Quote

Since the serial is CPU driven

It isn't. All ATmegas feature an UART which does the receiving without CPU. All the CPU has to do is to take the readily received character. The better firmwares do this using an interrupt.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: 1M baud rate on ATmega1284p
February 04, 2013 12:36AM
Yes it has a uart, with a 1 byte buffer. Wich means the CPU has to take care of every byte.
Re: 1M baud rate on ATmega1284p
February 04, 2013 07:57AM
"Taking care" means just reading the byte into RAM, taking 1 CPU cycle plus a few for the interrupt it's self. That's roughly 1% of what the step interrupt its self requires (about 1600 CPU cycles when accelerating).

Teacup's maximum step rate is about 15 kHz, so worst case you have 7 UART interrupts per motor step, delaying the next step by about 7%. Maximum step rate will be reduced by some 10%, I'd expect no other noticeable drawbacks.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Sorry, only registered users may post in this forum.

Click here to login