cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with thread startup after power cycle on embedded application

LadyMt
Associate II

Hello,

My application is loaded via flash memory. Four threads are created and they seem to be generated correctly because when the board is connected to the computer, all the threads run well. But if I disconnect the power and then turn it back on, the threads no longer run.

Systick is used for ThreadX and TIM6 is used for HAL-Tick.

But the scheduler does not start the threads. I do not understand why. I am new to threads.

Has anyone encountered a similar problem and have solutions to suggest? Please

I am attaching the file app_thread.c

2 REPLIES 2
AScha.3
Chief II

Hi,

i think, this has nothing to do with threads.

Just make a simple test program, just flashing a LED (if you have one there on a pin). no RTOS/thread .

Use same clock tree setting and flashing mode.

Then check: is this program running after power cycle ?

If you feel a post has answered your question, please click "Accept as Solution".

Thanks for your reply.

Before calling MX_ThreadX_Init();

void MX_ThreadX_Init(void)
{
  /* USER CODE BEGIN  Before_Kernel_Start */

  /* USER CODE END  Before_Kernel_Start */

  tx_kernel_enter();

  /* USER CODE BEGIN  Kernel_Start_Error */

  /* USER CODE END  Kernel_Start_Error */
}

in the main.c file, I make the leds blink and on startup it does. But after MX_ThreadX_Init(), nothing happens