Skip to main content
Associate
September 17, 2023
Question

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

  • September 17, 2023
  • 8 replies
  • 4393 views

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

 

 

    This topic has been closed for replies.

    8 replies

    Issamos
    Super User
    September 17, 2023

    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

    metron9Author
    Associate
    September 18, 2023

    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?

     

    Issamos
    Super User
    September 18, 2023

    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

    metron9Author
    Associate
    September 17, 2023

    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

     

    TDK
    September 18, 2023

    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""."
    metron9Author
    Associate
    September 18, 2023

    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
    September 18, 2023

    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""."