By any chance is there a known issue where the keyboard becomes entirely unresponsive until you reset it with SHIFT+power long press? Sometimes I have to reboot multiple times.
I’ve been fighting this and am really annoyed with it.
Might also be my keyboard being broken, no real idea what is causing it.
Indeed, it’s a know bug and related to "how” the stm32/keyboard chip handle the message from the pico. To be short: any incomplete/malformed request could hold the keyboard.
My initial approach was to reset the driver after a short period of time (less than 500 ms), but it’s possible that I didn’t implement it fully.
I can assure you that this is one of my goals for 1.0. However, I can’t say when it will be implemented.
I’m hopeful we’ll have it wrapped up this year, though.
@Kuratius Thanks to your “bug report”, and after some digging, I found few garbage poorly implemented code in the I2C driver on my side.
Really sorry to let a so much bugged version for a long times…
To make amends for that, I worked on a fix and reworked the I2C implementation. I can confirm that the 100 kHz setting works on my end, and the keyboard no longer freezes due to the faulty I2C.
If I’m not mistaken, Ernst patched the official BIOS. It was even re-added to the official GitHub repository 2–3 weeks ago.
But for my part, I’m proposing a reworked version that uses only the ST library and the ARM toolchain. After all, it was the “st-duino” overhead that I originally wanted to remove, adding the RTC and reducing power consumption.
To answer your question, I don’t think we should “force” a user to use a particular firmware.
But to help you decide, what I can say is that if you want to use the built-in RTC without making any hardware changes, reduce overall power consumption, or take advantage of the ability to save backlight and keyboard settings, then this BIOS might be of interest to you; otherwise, the official/Ernst’s BIOS is sufficient.
@JackCarterSmith I’ve been using your 0.9 BIOS, and noticed occasionally the power LED blinks briefly. Is that significant of something going on in the Pico? thx….Brian
Dear @JackCarterSmith, I’ve just installed your 0.9 firmware version and the good news is that it now works with a Luckfox Lyra running Calculinux.
Unfortunately, what isn’t working properly is shutting down using `shutdown -h now`. Although the system shuts down and the Luckfox Lyra powers off, the green power LED and the keyboard light remain on. Only when I hold down the power button for 2 seconds also the motherboard shuts down.
Mmm… Sound like the southbridge doesn’t understand (or receive) the shutdown update.
The correct register is at 0x0E:
Bit 5:0 => time in sec before stop/sleep,
Bit 6 => set to 1 to go in sleep,
Bit 7 => set to 1 to full power off.
Maybe the bit 7 who mess with your setup. The official firmware doesn’t need a bit to select between full power off or sleep…
You can write “0x80 | stop_delay” in the register to power off, or 0x40 to go to sleep. This will want affect the official firmware…
I’ll think about that, a simple write should be sufficient to trigger, and the 7th bit value to select between power off type.
EDIT: I remember the “why”: the stm32 needed to know when I requested a poweroff, I choosen to keep a dedicated bit (one for both power off and sleep) in the register for simplicity.
While playing some games I notice it randomly. Maybe on average once every 20 minutes or so. I have not changed any of the frequencies from the default…..Brian
@BrianO In this case, I suppose the I2C frequency should be 10 kHz, so clock stretching does its work. But in some case, I noticed the stretching can fail sometime, but the firmware detect it and proceed to a reset (only the I2C peripheral, not the picocalc, that’s why I added the indicator light so I’d “know” when it happened).
I should recommend to switch to 100 kHz, as it the default standard for I2C. I suppose the last version of the official firmware support it well now (in fact, just 2 days ago).
@Codiator I come with the idea to “force” set the full power-off bit if none are set when writing to avoid breaking both the official behavior and the I2C slave on my side.
It will be added in the next release (hopefully the glorious 1.0! :3).
Just keep in mind that, unlike the official firmware, I didn’t clamp the delay to 6s, you can request a delay of 10s, 20s or whatever between 0 and 63s.
Option 1) Nuke the flash and then flash PicoMite uf2
Option 2) Connect the MicroUSB port on the Pico to a computer and use a terminal emulator to access the serial console to reset the option.