Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

You clearly have never tried to implement sleep on a microcontroller. It has nothing at all to do with ACPI. And this kind of eldritch bug is par for the course. It has nothing at all to do with Microsoft or PCs at all. Microcontroller sleep just sucks in a lot of incredibly weird ways.
 help



On Band we had one of the top firmware engineers in the world who got our power situation setup and figured out that bug.

We had another bug involving a single cycle timing tolerance of memory on a bus, we were one cycle off in our config. We dual sourced memory chips and one of our suppliers had chips that worked with 1 fewer wait states, the other chip didn't. Once we started blending the 2nd chip into our production line we had weird issues.

One of my guys spent ~2 months thinking it was a software bug. We had a null ptr deref in our code, he went line by line and by the end of 2 months we had literally bug free calendar code.

Turns out the timing bug manifested in the exact same bit being corrupted every now and then in memory, which happened to be where our pointer lived at. We figured it out when a new production build caused memory to be moved around enough that someone else's pointer was getting corrupted. :)

So then the HW investigation began.

The principal engineer on Band's firmware refused to allow us to have any open crash reports, all crash dumps had to be fully investigated, root caused, and fixed. In a few cases we found customers who had faulty hardware and we reached out to individuals to replace their units, and brought the broken units back to our labs to figure out what went wrong on the assembly line. (Although on occasion stuff just gets assembled wrong, even with slews of automated tests on every unit that leaves the factory floor!)

That same principal engineer reviewed every single line of code that went into the Band's firmware. That code base had a consistency of code, style, and thoughtfulness that I'll likely never see again in my career.


did not, you are right. however, i don't think it should be an issue:

- get trigger for sleep - save state to nvram - ack sleep - wake up the same way as normal power-up, state being already in nvram

if this simple protocol is not working in your scenario, you have a uc larping as cpu doing way too much.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: