Open Sprinkler hw ver 1.0 with 1.8.1 Fw does not always startup

Showing 1-6 of 6 messages
Open Sprinkler hw ver 1.0 with 1.8.1 Fw does not always startup Christopher Gillanders 10/13/12 4:30 AM
Ray, I just updated my firmware to 1.8.1, and the first time it powered up fine, but after that it does not seem to initialize on power.  If I press the reset button two or three times, it will come up.  When I cycle power, the green LED lights, and the LCD has a faint row of boxes across the top.  Any ideas?

Chris.
Re: Open Sprinkler hw ver 1.0 with 1.8.1 Fw does not always startup Ray 10/14/12 6:08 PM
Hi Chris,

I figured out the problem: it's because v1.0 and v1.1 are programmed with the optiboot bootloader, which uses different fuse bits and causes the reset procedure to jump to the wrong program address. The fix is to plug in an isp programmer (or plug the chip into the opensprinkler usbtiny programmer) and run the following command:

avrdude -c usbtiny -p m328p -B 250 -F -U lfuse:w:0xff:m -U hfuse:w:0xd1:m -U efuse:w:0x06:m

double check the command and make sure all the numbers are correct. This should fix the problem. You don't need to re-flash the firmware (you can if you want). I will post an update soon. Let me know if this works or not. Thanks.

On Saturday, October 13, 2012 7:30:16 AM UTC-4, Christopher Gillanders wrote:
Ray, I just updated my firmware to 1.8.1, and the first time it powered up fine, but after that it does not seem to initialize on power.  If I press the reset button two or three times, it will come up.  When I cycle power, the green LED lights, and the LCD has a faint row of boxes across the top.  Any ideas?

Chris.
Re: Open Sprinkler hw ver 1.0 with 1.8.1 Fw does not always startup Christopher Gillanders 10/17/12 9:33 AM
Ray,  Thanks!  I have not tried it yet, but this makes sense, so I am sure it will work.  Where can I find a description of fuse bits, just for better understanding?
Re: Open Sprinkler hw ver 1.0 with 1.8.1 Fw does not always startup Ray 10/17/12 9:44 AM
You can take a look at the AVR fuse calculator first:
select ATmega328p as the mcu. This will give you the complete list of fuse bits options on ATmega328p. Basically the fuse bits allow you to set the mcu clock source, bootloader sector, watchdog timer, brown-out reset, and so on. For details you really have to look at the mcu's datasheet.

Warning: be very careful if you want to re-program the fuse bits. Make sure you understand the changes you are making. It's easy to mess up with AVR chips if you program the fuse bits wrong. The common mistakes are selecting the wrong clock source, or disabling reset pin -- these can make the mcu fail to start, or disable ISP programming capability. The only way to recover is to use a high-voltage (12V) programmer. I've learned my lessons. So be careful.
Re: Open Sprinkler hw ver 1.0 with 1.8.1 Fw does not always startup Jason Lewis 12/4/12 1:12 AM
I'm also having the same problem. Did you try this out?

Jason
Re: Open Sprinkler hw ver 1.0 with 1.8.1 Fw does not always startup Jason Lewis 12/4/12 2:17 AM


On Tuesday, 4 December 2012 20:12:23 UTC+11, Jason Lewis wrote:
I'm also having the same problem. Did you try this out?

Jason



To answer my own question. Yes, it does work. Fuses above are correct and solves the problem.

Jason