Skip to main content
Visitor II
August 20, 2024
Solved

Conflict from UART and STLINK

  • August 20, 2024
  • 4 replies
  • 1847 views

Hi there!

i start to work at one project with STM32G031J. Soo my i have this problem one of the pin is use for reset when i download the program at the same time is configurate a single wire half duplex , and 

- i can't simulate

- and it's look like every time i send out data they reset the CPU

Some one can help me

Thank you

SergioImmagine 2024-08-20 200549.png 

    This topic has been closed for replies.
    Best answer by BarryWhit

    Interesting issue. From the datasheet:

    BarryWhit_0-1724192075980.png

    possibly being the most opaque and least helpful footnote imaginable. "Particular care", wtf does that mean? (sigh middle-school typos in technical writing from multi-billion $$$ multi-national. can't they afford a spell-checker?)

    As DeLorean foretold, the RM documents the option bytes:

    nRST.jpg

    So it's not enough to assign an AF to the pin in CubeMX, you also have to set the option byte to incapacitate the nRST logic.

    4 replies

    Graduate II
    August 20, 2024

    Then you're going to have to make some hard choices..

    Test/Debug with a different variant of the part with more pins and dead-bug that into the circuit. 

    Learn to write code where you don't have to single step it all the time to understand how it executes.

    Use serial output to provide telemetry and dynamic analysis of function and flow.

    Perhaps you can use a NUCLEO board as a proxy until you have 95% functionality so you aren't fighting the low pin count issue beginning to end.

    Graduate II
    August 20, 2024

    Try harder to explain your question clearly. 

    Graduate II
    August 20, 2024

    I suppose there's a way to change to utilization of the NRST (Pin 4), either on-the-fly, or via the Option Bytes. Cube might not do it for you, but probably coved in the Reference Manual, etc

    stm32g031jx_so8n.jpg

    BarryWhitAnswer
    Graduate II
    August 20, 2024

    Interesting issue. From the datasheet:

    BarryWhit_0-1724192075980.png

    possibly being the most opaque and least helpful footnote imaginable. "Particular care", wtf does that mean? (sigh middle-school typos in technical writing from multi-billion $$$ multi-national. can't they afford a spell-checker?)

    As DeLorean foretold, the RM documents the option bytes:

    nRST.jpg

    So it's not enough to assign an AF to the pin in CubeMX, you also have to set the option byte to incapacitate the nRST logic.