Part Number: MSPM0C1104
Dear experts.
I'm developing low-power application for MSP0C1104, which should include i2c target functionality with wakeup from standby capability, and currently I'm not able to reach the correct wakeup from standby on i2c start event. My code is based on embassy project for mspm0 on Rust. Here are the main keypoints of setup:
1) The MCLK is configured to use SYSOSC directly (usemfclk=0, uselfclk=0).
2) embassy-time-driver uses TIMG8 on LFCLK to count in STANDBY. Every 2 seconds (65535 ticks on 32768Hz) it triggers interrupt to increment counter.
3) I2C is initialized with this config:
clock_source: ClockSel::BusClk,
clock_div: ClockDiv::DivBy1,
invert_sda: false,
invert_scl: false,
sda_pull: Pull::Up,
scl_pull: Pull::Up,
bus_speed: BusSpeed::Standard,
TSTART interrupt is unmasked. TWUEN bit is disabled during init according to errata ERR_04, though I tried both enabling it once and forever and enabling-disabling around wfe, doesn't affect the main issue.
Additional setups added in case:
Moreover, I assert before every listening:
4) I need to use STANDBY1 for my application so it's configured at the beginning:
Entering standby happens through embassy executor main loop wfe() and I wait for i2c transaction here:
5) I use additional pin for CLK_OUT monitor:
Now the main problem description: I see the correct SYSOSC output before entering standby (it happens on button press), then I see bursts of SYSOSC every time TIMG8 fires it's reloading interrupt. But when I2C controller starts it's communication there is no fast clock visible on start condition. The only time i2c revives is on TIMG8 interrupts, then I see couple of SCL ticks and SDA line changes correspondingly. Basically because of these little bursts every 2 seconds I2C transaction finishes succesfully, no data is lost (providing TWUEN is set once and for all), that means I2C itself is functional, but it takes more than a minute for simple write-read.
My main conclusion is that I2C is not able to request async fast clock, though I configured everything I could think off. I'll be happy to get any advice or possible solutions.


