Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

microbitv2: Updates for micro:bit 0258 beta 2 release #1012

Merged
merged 4 commits into from
Mar 16, 2023

Conversation

microbit-carlos
Copy link
Contributor

All the changes in this PR are isolated to the microbitv2 board.

The main change here is removing an ADC read with a 3ms wait that was performed inside a pin interrupt (calling pwr_mon_get_power_source()).
Other changes around this area have been done to simplify a bit the state management of some of the micro:bit-specific features.

@mbrossard let me know if you prefer this PR to target the develop branch instead, if possible we'd like to do a 0258 release in a few weeks.

Also removed `initial_fade_brightness` a static global that was
just a constant value.
So rather than go through a specific main_shutdown_state state to set
the "user event" (raising an interrupt and sending I2C data),
it just does that action directly when the button is long-pressed
or when the wake_from_usb flag is checked.

Also sets the interface_power_mode default state to 'Running'.
Not MB_POWER_DOWN, as until a power mode is requested the device
is awake.
…errupt.

As it caused problems in the KL27 port with a timer interrupt being
set up to wait for 3 ms inside the USB insertion interrupt.

Sets the timer interrupt to level 2 (second lowest, but higher
than the wake up pin and USB insertion), as the default is
level 0, over other important interrupts like USB and I2C.

Also removes the need to check for the power source when the
Interface is requested to go to sleep, as it only really needs to
know if it's "USB connected" (being on battery or USB power bank
should have the same effect, it should not behave differently in
battery power vs USB power bank).
@mathias-arm mathias-arm merged commit 9e32454 into ARMmbed:main Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants