cancel
Showing results for 
Search instead for 
Did you mean: 

Programming and debbuging a STM32G474

EliazLB
Associate III

Hello,

 

I am developing a electronic card that is supposed to be used in an automated test bench. I'm using an STM32G474 to control the card. I have already created one iteration of the card but I realised I made a mistake.

I wanted to use the bootloader to program the card but realised far too late that I didn't install it properly and cannot use it. Plus I'm unable to debug with it.

I now want to replace this system but I can't figure out what to use and how to route it.

I think I could use STlink but I can't seem to figure out how it works and how to route it on the STM.

Could anyone help me figure out this ?

Thank you very much.

7 REPLIES 7
Andrew Neil
Super User

Yes, of course you can use an ST-Link.

Or any SWD-capable probe.

 


@EliazLB wrote:

I can't seem to figure out how it works and how to route it on the STM.


I would strongly suggest that you get a Nucleo board, and look at how that does it, and practice using the tools.

See 'Product Evaluation Tools' on the 'Tools & Software' tab of the Product Page:

https://www.st.com/en/microcontrollers-microprocessors/stm32g474re.html#tools-software

See also the STM32 datasheet and ST-Link User manual.

See also Application note AN5093 Getting started with STM32G4 Series hardware development boards.

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
waclawek.jan
Super User

Read AN5093 ('G4 hardware design guide), the SWD subchapter of Debug management chapter.

You can also get inspired by the 'G4 Nucleo64 board.

JW

I do have a Nucleo board with the right STM on it. 

I just don't really see how it could help as I can't seem to find any schematic I could use.

I'll try to use the AN5093.

But thank you still :)


@EliazLB wrote:

I do have a Nucleo board with the right STM on it. 


Which one do you have?

 


@EliazLB wrote:

I can't seem to find any schematic I could use.


The schematics will be on the 'CAD Resources' tab of the Product Page; eg,

https://www.st.com/en/evaluation-tools/nucleo-g474re.html#cad-resources

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

I have the nucleog474RE. 

So https://www.st.com/en/evaluation-tools/nucleo-g474re.html#cad-resources

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
waclawek.jan
Super User

>I do have a Nucleo board with the right STM on it. 

Well then you already have the STLink on the same board, and it's by default connected to the target STM32, isn't it.

One basic way to test it is to use the CubeProgrammer.

JW