Skip to main content
JDesi.1
Associate III
June 8, 2022
Question

Reset of the controller

  • June 8, 2022
  • 11 replies
  • 7430 views

Very new to ST and struggling to understand the basics. As posted in previous posts i am using the STSPIN3201 motor controller, i am trying to write the basic LED toggling program. From STSPIN32F0 data sheet i found the micro used is STM32F031C6. I created a small project selecting the micro, but i am observing micro reset. How do i rectify? Please help.

0693W00000NrRvqQAF.jpg0693W00000NrRw5QAF.jpg0693W00000NrRwFQAV.jpg 

This topic has been closed for replies.

11 replies

Peter BENSCH
ST Technical Moderator
June 8, 2022

What is your definition for GreenLed_Pin?

Why are you OR it with GPIO_PIN_1?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
JDesi.1
JDesi.1Author
Associate III
June 8, 2022

I have defined two output ports as shown below, but i have not done any OR operation, the code is generated automatically. i have defined the green led as below.

0693W00000NrS9xQAF.jpg 

Peter BENSCH
ST Technical Moderator
June 8, 2022

OK, the line with GreenLed_Pin|GPIO_PIN_1 is the initialization of the two port pins.

But what special reason is there that you defined PB0 for the LED, when PB0 of the internal STM32F031C6 is neither connected nor led out?

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.