Flashlight Firmware Repository

TK or anyone that's used bistro. First time trying it, on a wight FET+1 driver, a Tiny25V. It seems to always come up in config mode. There's a pause for couple secs, then it starts from config setting #1 - if I just let it go, sometimes it stops in config #2, one time I let it go thru all settings, and the LED was on in the end, but as soon as I cycles power, it still doesn't work - runs config mode again.

I'm using the fuse settings as specified in the header of the source code. Anyone get it working? Anyone see this happening?

Hmmm, I havenā€™t seen that. Iā€™ve flashed bistro many times, you know, making tweaks, adjusting defaults, LVP, upgrading to new bistro revisions, etc. Though Iā€™ve only used it on attiny85 (normal, not ā€œvā€).

Youā€™re trying the newest revision 207 (2015-11-08)?

I see bistro.c mentions these fuses
* Low: 0xd2
* High: 0xde
* Ext: 0xff
But, TK has different fuses in the latest revision (2015-11-08) of her bin/flash-25.sh flashing script.
http://bazaar.launchpad.net/~toykeeper/flashlight-firmware/tiny25/changes

avrdude -c usbasp -p t25 -u -Uflash:w:$FIRMWARE -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
http://www.engbedded.com/cgi-bin/fcx.cgi?P_PREV=ATtiny25&P=ATtiny25&M_LOW_0x3F=0x12&M_HIGH_0x07=0x07&M_HIGH_0x20=0x00&B_SUT1=P&B_SPIEN=P&B_CKSEL3=P&B_CKSEL2=P&B_CKSEL0=P&V_LOW=e2&V_HIGH=DF&V_EXTENDED=FF&O_HEX=Apply+values

You could try those to see if it kills your bug.

Where is the Nov 8 version? Latest source code posted is from Oct 18th, rev 153.1.2 here: http://bazaar.launchpad.net/~toykeeper/flashlight-firmware/trunk/files/head:/ToyKeeper/bistro/ ??

Hhmm. Looks like she dropped brown-out detection, but didn't update the comments maybe... I'll look into this more.

I didnā€™t notice that bistro has made it into TKā€™s normal firmware repository.

Her testing repository is where I got the Nov 8 r207 version. ~toykeeper/flashlight-firmware/tiny25 : files for revision 217

~ edit ~
She dropped BOD and also increased the startup delay from 4ms to the max of 64ms. You can compare them with these direct links to each set of fuses in the Engbedded Atmel AVR Fuse Calculator.

bistro.c fuses
L: 0xd2, H: 0xde, E: 0xff in Fuse Calculator

bin/flash-25.sh (2015-11-08) fuses
L: 0xe2, H: 0xdf, E: 0xff in Fuse Calculator

Looking through my files it seems Iā€™ve been using BOD 1.8v, startup delay 64ms (max). L: 0xe2, H: 0xde, E: 0xff. I believe I been using those since the beginning with bistro, ignoring the ones mentioned in bistro.c. Thought a longer startup delay wouldnā€™t hurt anything.

Ahh, ok. I'll check out that version then, and the fuses. Thanks!

Also just try reflashing a couple times. I had a odd, different bug when 1st trying out the tiny85. The bug was there for the first couple flashes, then it just disappeared on a later flash and never came back. I did nothing to fix the bug. No changes. Just vanished. :ghost:

I've done lots of 85's with my latest firmware - goes really smooth now, no hickups, but this is my first 25V using bistro. I used 25's back in the beginning though.

Got the new 11-08 version with the new fuse settings (e2, df, ff) and it's still working the same - always comes up in config mode. How is it supposed to start up? Is there a default mode set?

I'm confused, info is sketchy, TK doesn't seem to be around.

I think TK will be back next week. I cannot remember what planet(s) she was visiting but she is coming back soon.

Hi, I was temporarily tied up in Mordor, but now Iā€™ve got a few days in The Shire to catch up a bitā€¦

If it enters config mode, it thinks that fast_presses is greater than 15 (at least one of its four upper bits is set) and the OTC value indicates it was a short press.

So, this could mean that the OTC isnā€™t calibrated. Or it could mean that the mem decay trick isnā€™t working. Iā€™d start by measuring the OTC values and then plugging them into a new build of bistro.

BTW, the weather in Mordor is nice this time of year.

I think I got a problem with the OTC cap - I added it later by hand soldering so maybe it got too hot, or bad solder joint. I'll try replacing it. Thanks!

If you want to you can add this firmware to the site:

Iā€™m mighty impressed that you can get internet in the Shire. :smiley: Never looked like they had much in the way of technology, at all. I mean they donā€™t even know how to make or otherwise acquire shoes! They make the Amish look like the Jetsons.

It was the cap - bad solder joint. Once fixed, it came up in 4 modes, well 3 modes plus moon. Think that's the default?

On to the next problem - high mode flickers on for a moment than switch's right a way to the 1st mode. If a use a higher resistance cell, the problem goes away. I noticed this behavior when trying to get a tailcap amp reading, even on the weaker cell. Don't think I ever saw a problem like this - not sure, maybe bad ground. Something to do with high amps, not just FET usage... Dunno.

Update:

Ok, - got a Fix!! Added a 2nd 10 uF cap sitting on top of the normal one, and wholla! Problem goes away!! Details in Post #580 here.

I've used this type of fix before, on a 22 mm driver.

Yup, that sounds like the issue Iā€™ve been trying to figure out. About all I know about it is to add a second or bigger cap though, or maybe add a little one between VCC and GND, or something along those lines. Iā€™m really not an electrical engineer.

TK - so are you gonna go with the extra cap? Are you still researching it? Is this happening on the X6/X5 driver version?

I'm wondering if there's any other effects - reduced amps or any other flakiness. Have you noticed any side effects?

Update:

The other really annoying issue has been the bright flash/blink, switching from Hi to moon/low. I added back the 12K resistor across the FET gate and it seems to eliminate it. I made some code changes to zero out the PWM outputs upon init, but that alone didn't help. I left those zero settings in the code though, because the state it's in now is perfect.

I tried a lot of firmware tricks to try to eliminate the turbo->moon flash, but nothing seemed to make any difference. It seems to be entirely a hardware issue.

About the extra cap, Iā€™ve been away for a few weeks and canā€™t do much testing. However, I should have a fix to test when I get back home.

Adding a 12K resistor across the FET gait (to gnd) seems to have fixed it perfectly. I tested it on the bench and the flash went away totally, completely. Then, made the same resistor mod to a wight FET+1 driver, ATtiny25V, extra 10 uF cap stacked, running my own ported version of what started as STAROffTime (OTC). Installed the driver in a new style Convoy L2 w/UCLp, de-dedomed XM-L2 U2 (oopsy!) U4 1C on a Noctigon and got:

EFEST 26650 4200 @4.21v - 5.24A tail

1636 lumens @start, 1608 lumens @30 secs, and 282 kcd measured at 5m (1062 meters)

So I'd say the resistor and cap certainly don't seem effect performance, so far so good.

Cool!! Thank you for the trobleshooting.

Iā€™m sure this information has been laid out somewhere for the simple-minded, but I donā€™t understand all of the ā€œincludeā€¦ā€¦ .hā€ all over the code. This must be the reason Iā€™ve stuck with blf-a6 code from May.