Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
jgrausgruber
Level 1
Level 1
25 sign-ins 10 sign-ins First question asked

Hello

I always getting in the IntDefaultHandler if I activate the Timer Interrupt. But if i comment out the function  "ModuleSetStatus(MODULE_STAT_COMM_ERROR); "  in the Timer ISR it will work again. 
I can not find my error in the code, can somebody help me please.

 

/******** Timer ISR************/

CY_ISR(timer_1_handler)
{

/*Timeout for Communication
Reset all Values to Default
*/
ModuleSetStatus(MODULE_STAT_COMM_ERROR);
Timer_1_WriteCounter(0);
/* Clear the terminal count interrupt */
TIMER_1_ISR_ClearPending();
Timer_1_ClearInterrupt(Timer_1_INTR_MASK_TC);

}

 

/************* After Line "uint8_t state = slave->fsmState" the programm goes to IntDefaultHandler ***********/

void ModuleSlaveFSM(ModuleSlave *slave){
static uint8_t status;
uint8_t state = slave->fsmState;

switch(slave->fsmState){
case SLAVE_IDLE:
I2C_Slave_1_I2CFwBlockReset();
I2C_Slave_1_Start();
slave->fsmState = SLAVE_START;
break;
case SLAVE_START:

break;
case SLAVE_STOP:
break;
case SLAVE_ERROR:
break;
}
}

 

jgrausgruber_0-1691059864277.png

 

0 Likes
2 Replies
Rohan136
Moderator
Moderator
Moderator
25 solutions authored 10 likes received 50 replies posted

Hi @jgrausgruber ,

 

I'm debugging your issue. I'll get back to you as soon as possible.

 

Regards,

Rohan

0 Likes
Rohan136
Moderator
Moderator
Moderator
25 solutions authored 10 likes received 50 replies posted

Hi @jgrausgruber ,

It is difficult for me to debug the whole project without understanding of radnar library. Can you please provide me the simpler version of your project ? If not can you provide the understanding of library and what each file does?

Regards,

Rohan

0 Likes