Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Status
Not open for further replies.
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
 

Hi,

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

Klaus
 

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
 

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
 

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:

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
 

Using a watchdog-timer may solve the problem..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top