David Buezas

Results 344 comments of David Buezas

~Also, the PMU lib resets the clock to 32Mhz after wake up.~ update: my mistake

And the bootloader is twice the size of the optibot for atmega328p

That's a good point @LaZsolt, this chunk for example is largely not needed, and the compiler can't remove it: https://github.com/dbuezas/lgt8fx/blob/master/lgt8f/cores/lgt8f/main.cpp#L27-L107

I think it can't be removed even if no external clock is used because of this: ``` if((VDTCR & 0x0C) == 0x0C) { // switch to external crystal sysClock(EXT_OSC); }...

We could also add menu options for tweaking the compiler optimisation flags (and decide between speed and size). Changing them will totally break the timings of bit-banged protocols (e.g. Software...

> Please, let’s not start breaking things. If we want this core to be widely used it must be stable. > I don’t think this can be removed! This is...

The internal clock is also set twice: First here: https://github.com/dbuezas/lgt8fx/blob/master/lgt8f/cores/lgt8f/main.cpp#L53-L54 and then again here: https://github.com/dbuezas/lgt8fx/blob/master/lgt8f/cores/lgt8f/main.cpp#L123-L137 there go a couple of extra unnecessary flash bytes

Aren't both equivalent? I guess it is easy to test, I'll see if it makes a difference.

Code is prettier, but it seems like they are identical. I'm still very curious about what you said about pgm_read_any. If access can be made fast as RAM, it is...

Yes, you are right, I just came back to correct that 😆 I'm using timer 3 in an application and thought `oh, instead of #define TCNT3 _SFR_MEM16(0x94)` I should do...