Hello!
I am using MAC57D54MB with MQX4.2 RTOS. By default, PIT_4 is running which is the DMA1_Trigger #1. This runs well with the flags being cleared.
But I am having problems on PIT_2 which is the Injection conversion trigger for ADC. Its flag PIT_TFLG2 cannot be cleared when writing 1 to it(as suggested by reference manual). This is using a shared isr and PIT_4 still works well.
This is using the A5 core btw and even other PIT are run, same behavior occurs(its corresponding flag cannot be cleared).
Would appreciate if anyone suggest for me to try.
Below code is the initialization of the PIT_2:
result = hwtimer_init(&PIT02, &BSP_SYSTIMER_DEV, PIT_ID_02, BSP_SYSTIMER_ISR_PRIOR);
if (MQX_OK != result) {
printf("\nhwtimer_init error");
}
result = hwtimer_set_freq(&PIT02, 1000000, 10);
if (MQX_OK != result) {
printf("\nhwtimer_set_freq error");
hwtimer_deinit(&PIT02);
}
result = hwtimer_callback_reg(&PIT02,(HWTIMER_CALLBACK_FPTR)_pit_isr_02, NULL);
if (MQX_OK != result) {
printf("\nhwtimer_callback_reg error");
hwtimer_deinit(&PIT02);
}
result = hwtimer_start(&PIT02);
if (MQX_OK != result) {
printf("\nhwtimer_start error");
hwtimer_deinit(&PIT02);
}
Best regards,
Kevin