cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 not working with different Supply

Prasad_2001
Associate II

Hello, 
My STM32G030F6P6 is working fine with the power supply from Laptops USB Port. I am just running simple I2C Scan program. When I power up the STM with charging adapter it is not able to show me the i2c scanned devices on serial monitor. I am using Arduino to get data through uart and display it on the serial monitor.
Please provide the necessary circuitry to make stm chip work with any power supply like various charging adapters.  

1 ACCEPTED SOLUTION

Accepted Solutions

Have you tried any other charger(s) and/or any other power supply(ies)?

What testing/investigation/debugging have you done to find out why your code doesn't work when powered from the "charging adaptor" ?

First thing to check would be your ground connections - perhaps the laptop provides a common ground, and that's missing with the "charging adaptor" ... ?

A full schematic of your setup would help. Maybe also some photos.

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228 

 

View solution in original post

7 REPLIES 7
Andrew Neil
Evangelist III

@Prasad_2001 wrote:

When I power up the STM with charging adapter  


What do you mean by that?

This kind of thing:

AndrewNeil_0-1722335951752.png

 

What testing/investigation/debugging have you done to find out why your code doesn't work when powered from the "charging adaptor" ?

First thing to check would be your ground connections - perhaps the laptop provides a common ground, and that's missing with the "charging adaptor" ... ?

A full schematic of your setup would help. Maybe also some photos.

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228 

 

TDK
Guru

Any power supply should be sufficient, provided it can supply enough power. Probably the issue lies somewhere else.

Is this a custom board? If using USB for communication, ensure you are using a data cable. You can debug a program that "isn't working" to find out what code is executing and determine the source of the issue.

If you feel a post has answered your question, please click "Accept as Solution".

Yes its similar to Images provided by you(I have attached image of the adapter I am using)
I have tested the results of I2C Scan Program which helps to detect the connected I2C devices with the MCU and this program is perfectly executing and scanning the devices when power is supplied with the Laptops USB port but not with the charging adapter.
While using charging it is not able to detect the I2C devices or cannot execute any other simple programs.

 

Have you tried any other charger(s) and/or any other power supply(ies)?

What testing/investigation/debugging have you done to find out why your code doesn't work when powered from the "charging adaptor" ?

First thing to check would be your ground connections - perhaps the laptop provides a common ground, and that's missing with the "charging adaptor" ... ?

A full schematic of your setup would help. Maybe also some photos.

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228 

 

Thank You For the response. The issue was with grounding and the breadboard which I was using was also internally damaged a little bit. Now i have connected my STM and Arduino with common ground on new breadboard and the issue is resolved.

Thank You For the help.

The issue was with grounding and the breadboard which I was using was also internally damaged a little bit. Now i have connected my STM and Arduino with common ground on new breadboard and the issue is resolved.

Thank You For the help.


@Prasad_2001 wrote:

Thank You For the help.


You're welcome.

Now please mark the solution:

https://community.st.com/t5/community-guidelines/help-others-to-solve-their-issues/ta-p/575256

 

Note that everyone can see all posts - there's no need to post the same thing twice.

You can mention users using '@'...