cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F030R8T I2C pullup on pin 59 unable to program with it connected

metron9
Associate II

I used cubeMX to set up I2C it selected pins 58 and 59, all is well with uploading without the pullup resistor on pin 59 (10k) testing I2C transmit working fine.

Here is the output with resistor attached , And the cubeMX diagram below that.

Pulling the resistor when Retrying is being sent stopps the retry but hangs,

removing resistor and uploading again (using debug button on stm32cubeIDE works and completes)

metron9_0-1694984990326.png

metron9_1-1694985095721.png

 

 

8 REPLIES 8
Issamos
Lead II

Hello @metron9 

I think that you should add a pull-up resistor to both SCL and SDA pins. Not just one of them.

Best regards.

II

metron9
Associate II

I have moved SDA from pin 9 to Pin62 Regenerated code But i still cant program the chip when I have a pullup resistor tied to that pin. Here is another error display.

metron9_0-1694986867016.png

 

Yes of course, I do.

With both resistors removed I can reprogram the chip.

With a resistor on pin 58 SCL and no resistor on pin 59 I can program the chip.

So only pin 59 with a resistor pullup causes the chip to fail when uploading a new file.

I have been programming ATMEL chips for 20 years, i know certain pins connected to circuits can cause programming the chips to be a problem and those connections need to be disconnected.

I have been programming stm32 for less than a week. There should be no issue having a pullup on these lines.

I just tested using pins 61 (SCL) and 62 (SDA) and i am unable to program the chip if a pullup resistor is on Pin 61 (SDA) but no problem running I2C after disconnecting programming and reconnecting pullup. This is very strange.

I just tested a different program that has no I2C setup, The same two pins (perhaps more ill have to check) when pullup resistors are connected refuse to program the chip. Can this be a faulty or counterfit STlink V2 that i am using?

 

Can you test this issue with all possible I2C1 pins (SDA and SCL)in the MCU. Also, can you test using another STLink (make sure that you are using an original ST product not an imitation).

Best regards.

II

I think there are only 4 pins that allow I2C yes i tested all 4 58,59 the 59 is the problem and 61,62 pin 61 is the problem.

I have added a button to my setup to pull the pin low that allows me to continue developing and that works, but there should not be this problem. my setup below, this board i purchased from newbiehack.com, he solders the chips onto his own breakout boards. I am use to using Atmel DIPs so in cases like this i would just swap to another chip but i only have the one stm32 at the moment, I do also have a STM32F407VET6 dev board from china X003FQDN79 , I understand perhaps these are clones but i'm just getting started programming these so expect trouble along the way. 

I did test down to pins 62 down to 35 those two I2C pins are the only ones, makes me appreciate my Power Debugger on the Atmel chips much faster programming. How fast it the new ST programmer V3 compared to a st-link v2 by the way. 

I also have a 3.3 power supply connected , i see the st link v2 can power and program without external power but typically I have power to the chip supplied with all my other Atmel programmers, ICE, Dragon, Power Debugger, JTAG, all of them.

 

metron9_0-1694998282670.pngmetron9_1-1694998409912.png

 

 

TDK
Guru

Using a genuine programmer would probably fix the issue.

TDK_0-1695001460331.png

Counterfeit programmers often report a bogus SN and don't work well.

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

I wondered why it just gave me a B serial number. Ya and i cant even make out the printing on the chip on that purple board.  

This one look real?

metron9_0-1695006030847.png

 

TDK
Guru

That's not a genuine board either.

https://stm32-base.org/boards/STM32F407VET6-STM32-F4VE-V2.0.html

Perhaps look at st.com to find a board, or choose one in STM32CubeMX. The nucleo boards are relatively cheap.

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