+ Post New Thread
Page 3 of 3 FirstFirst 1 2 3
Results 41 to 47 of 47
  1. #41
    Member level 5
    Points: 1,639, Level: 9
    Achievements:
    7 years registered

    Join Date
    Apr 2011
    Location
    Istanbul, Turkey
    Posts
    81
    Helped
    0 / 0
    Points
    1,639
    Level
    9

    Re: MCU does not boot on power up, only starts when reset button is pressed

    Quote Originally Posted by KlausST View Post
    Are you 100% sure that the MCU doesn´t perform a single instruction?
    If you are less than 100% sure then please follow my recommendation of post #38.
    Yeah, I'm sure about that, none of the peripherals work in the "not booting" phase. It also draws less current (about 30% less) in that phase. I believe the program counter does not run, but I can see the crystal oscillates in this phase.

    Another thing is if I start the debugging feature from the uVision and press run, I boots, but this is the same thing as pressing the reset button as far as I know.

    I'll follow your suggestions in #38.

    Thanks,
    Ogulcan
    Cheers,
    Ogulcan



  2. #42
    Super Moderator
    Points: 60,546, Level: 60
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    12,360
    Helped
    2864 / 2864
    Points
    60,546
    Level
    60

    Re: MCU does not boot on power up, only starts when reset button is pressed

    Hi,

    I believe the program counter does not run, but I can see the crystal oscillates in this phase.
    That`s the point.

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   Alt21st February 2018, 16:24

      advertising

        
       

  3. #43
    Member level 5
    Points: 1,639, Level: 9
    Achievements:
    7 years registered

    Join Date
    Apr 2011
    Location
    Istanbul, Turkey
    Posts
    81
    Helped
    0 / 0
    Points
    1,639
    Level
    9

    Re: MCU does not boot on power up, only starts when reset button is pressed

    Hi,

    I wrote a very basic software that can work on my board. The behavior is same, so the issue is not software related.

    However, I increased the reset capacitor and now the MCU boots most of the time, especially it boots when I plug a real laptop adaptor (19V) feed from mains.

    If I set my power supply to 19V and plug its connector to the boards power connector, it doesn't boot most of the time (sometimes it boots).

    I think maybe the laptop adapter causes a bounce that initiates couple of resets, yet I cannot observe such behavior in oscilloscope.

    Thanks,
    Ogulcan
    Cheers,
    Ogulcan



  4. #44
    Member level 5
    Points: 1,639, Level: 9
    Achievements:
    7 years registered

    Join Date
    Apr 2011
    Location
    Istanbul, Turkey
    Posts
    81
    Helped
    0 / 0
    Points
    1,639
    Level
    9

    Re: MCU does not boot on power up, only starts when reset button is pressed

    Hi,

    I increased the reset capacitance even more to 66uF (around 75uF as I measured) and the problem solved.

    Now I have problems when downloading the program to the flash, but I can sort it out through settings in uVision I guess.

    Ogulcan
    Cheers,
    Ogulcan



  5. #45
    Member level 5
    Points: 1,639, Level: 9
    Achievements:
    7 years registered

    Join Date
    Apr 2011
    Location
    Istanbul, Turkey
    Posts
    81
    Helped
    0 / 0
    Points
    1,639
    Level
    9

    Re: MCU does not boot on power up, only starts when reset button is pressed

    Hi,

    There has been some developments on this issue. The previous solution was not actually a solution, it was a weak workaround.

    First of all, technical support from ST said that I need to put 100nF capacitor, and I should remove the pull-up, as there is a pull-up internally. So I did what they suggested, which did not solved the problem at all.

    However, in the meantime I've discovered that the MCU actually tries to booth, but it falls into the Error Handler function. This function is automatically created by the STM32CubeMX, located in main.c and it is as follows:

    Code:
    /**
      * @brief  This function is executed in case of error occurrence.
      * @param  file: The file name as string.
      * @param  line: The line in file as a number.
      * @retval None
      */
    void _Error_Handler(char *file, int line)
    {
      /* USER CODE BEGIN Error_Handler_Debug */
        TRACE_ERROR("ERROR HANDLER\r\n");
      /* User can add his own implementation to report the HAL error return state */
      while(1) 
      {
      }
      /* USER CODE END Error_Handler_Debug */
    }
    So, is there anyone having any clue about why my program counter falls into this error handler function as soon as I feed my circuit although it boots when I press the reset button.

    Thanks,
    Ogulcan
    Last edited by ogulcan123; 6th April 2018 at 13:38. Reason: typos
    Cheers,
    Ogulcan



  6. #46
    Super Moderator
    Points: 60,546, Level: 60
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    12,360
    Helped
    2864 / 2864
    Points
    60,546
    Level
    60

    Re: MCU does not boot on power up, only starts when reset button is pressed

    Hi,

    I already assumed that the controller performs some instructions.

    * There should be a document where it shows what conditions lead the controller to ener the error_handler.
    Maybe there are some bits/bytes that describe the error source.

    For a workaround you could implement in the error handler (instead of the while(1)):
    * wait 20ms
    * jump to the start (reset vector).

    ***
    I´m not familiar with oyur system, but maybe it tries to load your application program from an SD card.. but the SD card isn´t ready yet.
    Or any other periferal isn´t ready.

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   Alt6th April 2018, 14:11

      advertising

        
       

  7. #47
    Advanced Member level 5
    Points: 26,883, Level: 39
    BigBoss's Avatar
    Join Date
    Nov 2001
    Location
    Turkey
    Posts
    3,853
    Helped
    1163 / 1163
    Points
    26,883
    Level
    39

    Re: MCU does not boot on power up, only starts when reset button is pressed

    Using a watchdog-timer may solve the problem..



    •   Alt6th April 2018, 14:20

      advertising

        
       

--[[ ]]--