This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

My MCU jumps to os_idle_demon after some seconds Network STM32f

Hello,

Here is my program:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
int32_t socket;
uint8_t *sendbuf;
void Time3(void){
TIM_TimeBaseInitTypeDef TimeStruct;
NVIC_InitTypeDef nvicStructure;
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_3);
nvicStructure.NVIC_IRQChannel = TIM3_IRQn;
nvicStructure.NVIC_IRQChannelPreemptionPriority =1;
nvicStructure.NVIC_IRQChannelSubPriority = 0;
nvicStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&nvicStructure);
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3,ENABLE);
TimeStruct.TIM_Prescaler=35;
TimeStruct.TIM_Period=200; ///200=100us
TimeStruct.TIM_ClockDivision=TIM_CKD_DIV1;
TimeStruct.TIM_CounterMode= TIM_CounterMode_Up ;
TIM_TimeBaseInit(TIM3, &TimeStruct);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

But after some seconds which it works fine, it jumps to os_idle_demon function in RTX.

Fullscreen
1
2
3
4
5
6
7
/// \brief The idle demon is running when no other thread is ready to run
void os_idle_demon (void) {
for (;;) {
/* HERE: include optional user code to be executed when no thread runs.*/
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I don't know why it goes to this function which disables my MCU operation. I am a newbie to debugging to trace this problem (why this happens before going to this sleep function).

0