2025-07-23 9:25 AM - edited 2025-07-28 1:32 PM
Hi, I am working on a project where I have a custom board with STM32L073 MCU and I want to read a color sensor (AS7341) via I2C. This will be a low power application. I will harvest energy via NFC from a smartphone (I am using NTAG I2C plus). I can get a voltage is about 2.8 V and current about 10-14 mA from the harvested energy. This will power up the color sensor and the MCU. I have been trying to operate the MCU at low power but I am unable to do it. I have tried regulating down voltage from a 3.7V 1000 mAh lipo battery to 1.8V and trying to run the MCU to get the color sensor data but I cannot do it. I tried using a logic analyzer to observe the I2C signals. For greater than 3.3V, it works fine, I am able to see the data in uart as well as in the logic analyzer but when it goes below 3.3V it doesn't work. I also tried regulating down to 2.8V from a battery, still doesn't work. I think I am missing something on how to operate the STM32 MCU in low power mode. Please let me know what I need to change in my code or board design. I have attached both below. (The circuit diagram is only for the STM32 MCU board. I am using a breakout board for the AS7341 to connect it to the MCU).
I am not much familiar with using low power modes, so I know I might need to make some changes in the clock configuration or something in the code or hardware side, but I am not sure what to do. Any help would be appreciated.
Solved! Go to Solution.
2025-07-25 12:35 PM
Yes,you should follow the recommended supply design.
"The VDD pins must be connected to V DD with external decoupling capacitors; one
single tantalum or ceramic capacitor (minimum 4.7 μF, typically 10 μF) for the package
+ one 100 nF ceramic capacitor for each V DD pin).
The VDDA pin must be connected to two external decoupling capacitors (100 nF ceramic capacitor + 1 μF tantalum or ceramic capacitor)."
Datasheet: "VDDA and VSSA must be connected to VDD and VSS, respectively"
Your VDDA does not look like it will have the same voltage as VDD.
2025-07-23 11:07 AM
"Doesn't work" is a bit vague. Does the microcontroller function at all with the lower voltages?
You don't seem to have adequate capacitors for VDD, VDDA.
Do you have pull up resistors on the I2C lines?
2025-07-24 11:35 PM
Hi, it does not function at all with lower voltage (anything less than 3V). I tried a simple blinky code and when the power supply is 3.3V or 3 V the GPIO toggles fine (No load connected, I just checked with multimeter) but when I use a voltage regulator to regulate it down to 2.8 V or 1.8 V it does not toggle (I got it toggle once somehow but it stopped when I disconnected and reconnected power supply). I even tried to see the I2C lines with logic analyzer- same thing happens- at 3V I see the SCL and SDA lines working fine but when I use 2.8V there is no signal. I have tried everything - I turned off all peripherals, set the clock for low power mode and set BOR level 0 (off). I have 10 Kohm pull ups on I2C line (but even a simple blinky code is not working for me).
Should I add 1uF and 10uF to VDDA and VDD respectively (according to the schematic you shared)? Anything else that I can do to solve this?
2025-07-25 12:35 PM
Yes,you should follow the recommended supply design.
"The VDD pins must be connected to V DD with external decoupling capacitors; one
single tantalum or ceramic capacitor (minimum 4.7 μF, typically 10 μF) for the package
+ one 100 nF ceramic capacitor for each V DD pin).
The VDDA pin must be connected to two external decoupling capacitors (100 nF ceramic capacitor + 1 μF tantalum or ceramic capacitor)."
Datasheet: "VDDA and VSSA must be connected to VDD and VSS, respectively"
Your VDDA does not look like it will have the same voltage as VDD.
2025-07-25 12:46 PM
Hi Chris,
Thank your for the suggestions. Can you please explain why you think the VDDA will not have the same voltage as VDD? Is it because I do not have the caps on the pin? Also, do you think this could be the only reason why it is not operating in low power? Should I also make any changes in the code - clock setup or other things? I am a bit new to this so it would be great if you could guide me.
2025-07-25 12:54 PM
From a DC perspective, VDDA is not connected to VDD.
If your code waits for the LSE oscillator that could be something to look at.
Have you tried running the debugger and observing where execution stops?
2025-07-25 12:59 PM
So, what should I do in order to connect VDDA to VDD?
Also, I cannot use the debugger at 2.8V or 1.8V. It does not find the chip at any voltage less than 3V. I am using ST-LINK debugger. Should I change anything in the clock configuration?
2025-07-25 1:01 PM
Dear @sam111 ,
as stated by @Chris21 , Your schematics has an issue on two pins : VLCD and VDDA, they should both connect to VDD Rail and the Capacitor in parallel to ground. in the shared diagrams above they are in serial and can not work.
We have no particular issue to run this product down to 1.7Volts.
Another important point also to check the AS7341 VDD as in datasheet it is 1.8V rail , I2C bus pull-ups with adequate configuration speed.
Hope it helps you.
STOne-32.
2025-07-25 1:10 PM
ST-LINK V2 manual says:
JTAG/SWD (Serial Wire Debug) specific features
1.65 to 3.6 V application voltage supported on the JTAG/SWD interface and 5 V tolerant inputs (a)
a. The ST-LINK/V2 can communicate with targets operating below 3.3 V but generates output signals at this voltage level. STM32 targets are tolerant to this overvoltage. If some other components of the target board are sensible, use ST-LINK/V2-ISOL, STLINK-V3MINIE, or STLINK-V3SET with a B-STLINK-VOLT adapter to avoid the impact of overvoltage injection on the board.
2025-07-28 1:31 PM