HI TI,
How can I set ADC interrupts to highest priority, so that SCI RX interrupt won't effect SPINTAC'S Position Plan when it's in motion?
Is there any other ways that I avoid the conflicts between these two interrupts ?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
HI TI,
How can I set ADC interrupts to highest priority, so that SCI RX interrupt won't effect SPINTAC'S Position Plan when it's in motion?
Is there any other ways that I avoid the conflicts between these two interrupts ?
Hi Sean,
I already tried to change the priority to ADCINT9 which is also in group 1 of PIE, but it didn't solve the problem of conflict.
Other than setting priority, what else can I do to avoid Rx Interrupts to stop my motor movements?
I set up ADC priority to ADC_IntNumber_1HP as followings, but it motor won't be able to initialize. It is the same way I setup ADCINT9, and motor works fine.But did not solve the conflict problem with SCI RX interrupts. So I am going to give a last try on this.
static inline void HAL_initIntVectorTable(HAL_Handle handle)
{
HAL_Obj *obj = (HAL_Obj *)handle;
PIE_Obj *pie = (PIE_Obj *)obj->pieHandle;
ENABLE_PROTECTED_REGISTER_WRITE_MODE;
pie->ADCINT1_HP = &mainISR;
pie->SCIRXINTA = &sciarxISR;
DISABLE_PROTECTED_REGISTER_WRITE_MODE;
return;
} // end of HAL_initIntVectorTable() function
static inline void HAL_acqAdcInt(HAL_Handle handle,const ADC_IntNumber_e intNumber)
{
HAL_Obj *obj = (HAL_Obj *)handle;
// clear the ADC interrupt flag
ADC_clearIntFlag(obj->adcHandle,intNumber);
// Acknowledge interrupt from PIE group 10
PIE_clearInt(obj->pieHandle,PIE_GroupNumber_1);
return;
} // end of HAL_acqAdcInt() function
void HAL_enableAdcInts(HAL_Handle handle)
{
HAL_Obj *obj = (HAL_Obj *)handle;
// enable the PIE interrupts associated with the ADC interrupts
PIE_enableAdcInt(obj->pieHandle,ADC_IntNumber_1HP);
// enable the ADC interrupts
ADC_enableInt(obj->adcHandle,ADC_IntNumber_1HP);
// enable the cpu interrupt for ADC interrupts
CPU_enableInt(obj->cpuHandle,CPU_IntNumber_1);
return;
} // end of HAL_enableAdcInts() function
// acknowledge the ADC interrupt HAL_acqAdcInt(halHandle,ADC_IntNumber_1HP);
When I setup ADC_IntNumber_1HP, DO I need any extra steps?