2019-09-16 12:19 AM
Hi All,
STM8S001J3M3TR is used in our product. From the spec of this MCU, it said that it only consume around 4mA in running mode. So, I chose this IC in our project. After I get this IC and check it. When no IO operation is performed, this MCU consume around 7 mA. After IO operation is running such as check the duty of PWM input signal, the current consumed suddenly jump to 16mA. I find that the IO can be configured as OD - open drain, PP- Push pull, True open drain mode etc. Which IO configuration consume lowest MCU current. What I should do to reduce the current consumed by the MCU. This MCU is used to detect the duty of the input signal, then output the PWM to control the brightness of LED and the speed of motor.
Regards
Barry Ng
2019-09-18 10:55 AM
Hi Barry!
16 mA seems quite alot, so I would say this is due to external consumers. Basically it's easy to get a good current consumption: always use the wait state (wfi/wfe instruction - don't loop continuously polling some event, but use interrupts) or even the halt mode (if your application supports it), stop the master clock source to any unused peripherals, disable any unused analog functions and don't leave any floating input ports. The rest is about the circuits you have around the MCU.
About the best port configuration, it depends on the port usage.
2019-09-23 11:12 PM
Hi Cristian Gyorgy,
Many thanks for your help. Your suggestion is professional and helpful. Thanks a lot.
On the other hand, from the STM8S spec. sheet, it said that the power consumed by this MCU can be further reduced after the program is executed in the RAM not flash. Where I can find the source C program code to implement this function ( Load the source code from flash to RAM then execute the loaded source code in ram)?
Best regards
Barry Ng