Skip to main content
Visitor II
June 8, 2022
Question

Reset of the controller

  • June 8, 2022
  • 1 reply
  • 4079 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.

    1 reply

    Technical Moderator
    June 8, 2022

    What is your definition for GreenLed_Pin?

    Why are you OR it with GPIO_PIN_1?

    Regards

    /Peter

    JDesi.1Author
    Visitor II
    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 

    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?