You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
New boards
M5StamP4XHub (ESP32-P4): power, Ex_I2C on Grove13, Grove channel outputs (Power.setGroveOutput(), getGroveOutput()), USB output and RGB LED (by @TinyuZhao, #437, #438)
M5UnitPoEP4X (ESP32-P4): Ex_I2C, the button, the RGB LED and the LT8912B Display Out are set up as on M5UnitPoEP4 when the board is board_M5UnitPoEP4X. It is detected with M5GFX #448 (chip revision 3.0 and later). Requires M5GFX with #441 (by @TinyuZhao, #448)
Buzzer
New M5.Buzzer: plays a single square-wave tone from a frequency and a duration (tone(), stop(), isPlaying(), isEnabled()). It uses a channel of the Speaker reserved for it, mixed with the public channels 0 to 7 (which behave as before), on whatever output M5.begin() configures, including external ones. On CoreMatrix it uses the IOE1 PWM buzzer; finite tones there are stopped by M5.update(). Example: examples/Basic/Buzzer (#454)
Microphone
Cardputer / Cardputer ADV / PaperMono (ESP32-S3): every recorded sample read the same value. M5.begin() drives GPIO46 high before the board is known (power hold of other boards), and on these boards GPIO46 is the microphone data input, which was left driven. After detection GPIO46 is now released as an input with a pull-down (open drain, latch high). This also covers a software reset where the previous run left GPIO46 as an output. Not affected when the application calls M5.Display.init() before M5.begin() or fixes the board with BOARD_ID (#457)
Speaker
PaperColor (ESP32-S3): the speaker amplifier stayed enabled after M5.begin() even when the speaker was never started, because GPIO46 (amplifier enable) was left driven high. After detection GPIO46 is now released with a pull-down, and the amplifier is enabled from M5.Speaker.begin(). M5.Speaker.end() before any playback no longer enables the amplifier for a moment. Behavior change: code that plays through the PaperColor amplifier with its own I2S driver instead of M5.Speaker must drive GPIO46 high itself. StampS3Mini (also the default for an undetected ESP32-S3 in the LGA56 package) now gets GPIO46 restored to its state before M5.begin(), as on StampS3 (#458)
StickS3: the speaker setup cleared bit 3 of the M5PM1 GPIO function register (0x16), which is half of gpio1's function, instead of gpio3's two function bits (speaker amplifier enable). A gpio1 function set with M5PM1_Class::setGPIOFunction() was changed on every start, and a gpio3 function left set before an ESP32 reset was kept (the M5PM1 keeps its registers across an ESP32 reset). It now clears gpio3's function bits (0xC0). Needs the M5GFX with the same fix for gpio2 (#453)
IMU
Added LSM6DS3TR-C support (I2C 0x6A / 0x6B), used by newer CoreP4X boards in place of BMI270, with the CoreP4X axis mapping. Older CoreP4X boards with BMI270 are still detected. Added imu_t::imu_lsm6ds3trc (by @hlym123, #441)
The LSM6DS3TR-C detection no longer delays startup on boards without an IMU. Its 15 ms power-on wait now runs where the sensor power is turned on (CoreP4X Power.begin(), and once before an external IMU detection on Ex_I2C). Code that powers a LSM6DS3TR-C itself and then calls M5.Imu.begin() needs to wait 15 ms first (#449)
RTC
PCF8563: a timer set before a reboot (M5.Rtc.setTimerIRQ() or M5.Power.timerSleep(seconds)) stopped in M5.begin() even with cfg.disable_rtc_irq = false. begin() now leaves a running timer unchanged. Behavior change: with disable_rtc_irq = false, a timer set before the reboot keeps running after M5.begin(), and clearIRQ() alone does not stop it; call M5.Rtc.setTimerIRQ(0) or M5.Rtc.disableIRQ(). The default (true) still stops it. disableIRQ() now selects the 1/60 Hz timer clock (TD = 11) for lower power, as the datasheet recommends (#447)
I2C
PaperDIY: Ex_I2C has no pins, as the board has no Grove port (G42 / G41 reach only the FPC-I2S connector). Behavior change: the internal I2C keeps its pins but moves from port 0 to port 1 (on Arduino, Wire1 instead of Wire), as on PaperS3, leaving Wire free for the sketch; a sketch that opens Wire on G41 / G42 itself now competes with the internal bus, so use M5.In_I2C for devices on FPC-I2S pins 4 / 5. M5.getPin(port_a_*) returns -1, and the external RTC / IMU and Unit display autodetection do not look for devices. Needs the M5GFX with the same change (#451)
On boards without external I2C pins, M5.begin() with cfg.external_rtc or cfg.external_imu reopened the internal I2C pins as a software I2C port and reset their GPIO routing. Ex_I2C is now begun only when it has a port (#451)
I2C_Class: a bus that the board does not have (no SDA / SCL pins) now does nothing: begin(), scanID() and every transfer return false (readRegister8: 0) without touching the bus. Before, such an Ex_I2C (port -1) was opened by M5GFX as a software I2C port on the pins that port last used, so M5.Ex_I2C.begin() or M5.Rtc.begin(&M5.Ex_I2C) in a sketch reached the internal I2C pins. isEnabled() now means the bus has valid pins (a negative software I2C port with pins is enabled too); it was true for In_I2C on boards without internal I2C pins, where M5.begin() then probed the internal RTC / IMU on a missing bus. Startup is about 60 ms shorter on StampC3 / C3U / S3 / P4 and NanoC6 / H2. On the PC build, In_I2C.begin() / Ex_I2C.begin() now return false (#452)
ModuleDisplay
M5.begin() sets up ModuleDisplay on CoreP4X (ESP32-P4) and passes the adopted board to M5ModuleDisplay::config_t::board unless the user set it, so M5GFX selects the wiring and the write-only transmitter path. Requires M5GFX with #407 (#440)
M5.begin() sets up ModuleDisplay on CoreMatrix (ESP32-C61). Requires M5GFX with #414. (#442)
Build
ESP32 projects using ESP-IDF 6.1.1 failed to compile: 6.1.1 renamed the DAC LL functions used by the Speaker (internal DAC output, use_dac) and removed dac_ll_digi_enable_dma(). The new functions are now used when the SDK has them (detected by hal/dac_types_private.h, not by the version number); earlier SDKs keep the old calls. Needs the M5GFX with the same fix (#443)
Internal
StamP4XHub: the battery checks identify the board by name, and the comment on the unset Port A gives the reason. No change in behavior (#439)
Require M5GFX 0.3.1 (ModuleDisplay on CoreP4X / CoreMatrix and M5UnitPoEP4X need its board IDs and panel support)