cancel
Showing results for 
Search instead for 
Did you mean: 

Toggling GPIOs on STM32F205RGT6

Jorge Troncoso
Associate II
Posted on February 07, 2018 at 04:36

Hi,

We designed a new PCB for the STM32F205RGT6, but we�re having trouble toggling GPIOs using the chip.

We wrote a simple program that toggles a GPIO every 250ms, we confirmed that the code works on the

http://www.st.com/en/evaluation-tools/nucleo-f207zg.html

and the

http://www.st.com/en/evaluation-tools/stm3220g-eval.html

, but when we port the code to our PCB it doesn�t work.

We know the code is running on the microcontroller soldered on our PCB and we know the MCU is reaching the critical section where it toggles the GPIO (because we were able to step through the code using gdb), however, for some reason we�re not seeing any change in voltage on the pin.

I attached the source code, the Makefile, and the linker script we�re using to this post. You can also check out our project on GitHub:

https://github.com/MITMotorsports/stm32f2_libs/tree/gpio_ll_cleanup/examples/gpio_ll

Any help would be much appreciated.

#stm32f205
13 REPLIES 13
Tilen MAJERLE
ST Employee
Posted on February 07, 2018 at 17:22

jorge16troncoso

‌,

is your pin soldered to board? One option is for sure cold solder.

Best regards,

Tilen

Posted on February 07, 2018 at 17:41

Sounds like a hardware issue, review the schematic, make sure you're looking at the right pin, and that you don't have any board level issues, like disconnected island, open/short pins, etc.

Check components as placed, check VCAP voltages and caps.

Focusing on the software seems to be ill-placed as it works on two other validated platforms, and you've eliminated most options on that path.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 07, 2018 at 18:27

Hi Tilen. Thanks for your reply. We thought about the possibility of an unsoldered pin, so we measured the voltage on the pin directly, but we still saw no voltage change, so there must be another problem.

The reason we thought it could be a software issue was because we've never tested our code on an STM32F205 chip. The two evaluation boards we've been using have an STM32F217 and an STM32F207 chip. Are there any configurations that we need to be careful about when we port code to an STM32F205 chip? We've gone through the manual and are pretty confident that we aren't doing anything incorrectly, but there might be something we're missing.

Posted on February 07, 2018 at 19:26

How about other pins. Can you toggle them. Do you see your toggling on an other pin. Or you could make a simple app which puts all free pins as '1' or '0'. Or why don't you take the Cube and make a new simple GPio pin test program with it for exactly your chip.

henry.dick
Senior II
Posted on February 07, 2018 at 20:37

I think you need to establish that you can program the chip first, then establish that the chip can run your code, before focusing on the code. 

It it sounds like a hardware issue to me, unless you can show conclusively otherwise. 

Posted on February 08, 2018 at 03:14

Thanks for your reply! We tried toggling other pins but againsaw no voltage change. Also, I'm not sure what you mean by taking the Cube and making a new GPio pin test program exactly for our chip. If I'm understanding correctly, I think that's exactly what we did. We wrote a program that toggles GPIOs on the

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fen%2Fevaluation-tools%2Fnucleo-f207zg.html

and the

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fen%2Fevaluation-tools%2Fstm3220g-eval.html

, confirmed that it worked on both boards, and then customizedthe programexactly for our chip.

I'll try writing a program thatsets all free pinsto '1' next,but I'm not sure if this will reveal any new insights. Any other suggestions?

Posted on February 08, 2018 at 03:20

Hi Clive. Thanks for your reply. We've reviewed the schematic, double checked that we're looking at the right pin, checked the VCAP voltages, and measured voltages directly on the pins being toggled, which eliminates the possibility of the issue being because of a disconnected island.

We'll continue looking at other potential hardware bugs, but we haven't been able to spot one yet. Is there anything else you'd recommend looking at?

Posted on February 08, 2018 at 03:32

Thanks for your reply. As I mentioned in my post, we were able to step through the program running on our chip using GDB, so we know we can program the chip and we know we can run code on the chip. We also double checked our hardware a few times, but we haven't spotted any bugs yet. Do you have any other suggestions? In the meantime we'll continue looking at the hardware to see if we can identify any issues.

Henry Love
Associate
Posted on February 09, 2018 at 08:15

Hello,

My name is Henry and I've been working with Jorge on this project - particularly on the hardware side.  We are still trying to debug this problem and are taking a closer look at the hardware involved.  Below is an image of the schematic of the MCU on our PCB which was procured by referencing schematics of dev-boards (primarily of the

http://www.st.com/en/evaluation-tools/stm3220g-eval.html

 chip

) and by reading the data sheet of the

http://www.st.com/content/ccc/resource/technical/document/datasheet/bc/21/42/43/b0/f3/4d/d3/CD00237391.pdf/files/CD00237391.pdf/jcr:content/translations/en.CD00237391.pdf

.  Please note that D4 is replaced by a short and we are using an external ST-LINK/V2-1 from a

http://www.st.com/content/ccc/resource/technical/document/user_manual/group0/26/49/90/2e/33/0d/4a/da/DM00244518/files/DM00244518.pdf/jcr:content/translations/en.DM00244518.pdf

to program the 

STM32F205

 via SWD, so there is no embedded programmer.  If there are any suggestions/errors in this schematic, pointers or advice are greatly appreciated.0690X00000609edQAA.png