I have a question related to quitting the scheduler loop in the Xtensa FreeRTOS port:
Freertos doc says that in order to quit the RTOS scheduling loop vTaskEndScheduler must be called
Please see https://www.freertos.org/a00133.html
vTaskEndScheduler is implemented in term of vPortEndScheduler
Xtensa port has this implementation for vPortEndScheduler
void vPortEndScheduler( void )
{
/* It is unlikely that the Xtensa port will get stopped. If required simply
disable the tick interrupt here. */
}
Having ask my HW buddy, the tick interrupt for us is interrupt 2 and 3,
~~~
Interrupt | Type |Level | BInterrupt | Pin Source
———-+——–+——+————+———–
0 | Level | 1 | 0 | Tied low
1 | Edge | 3 | 1 | Tied low
2 | Timer.0| 2 | | Internal
3 | Timer.1| 3 | | Internal
~~~
so I did something like this
~~~
void vPortEndScheduler( void )
{
/* It is unlikely that the Xtensa port will get stopped. If required simply
disable the tick interrupt here. */
uint32_t ints = xthal_get_intenable();
__dsp_printf(“1) xthal_get_intenable 0x%xn”, ints);
xt_ints_off(1 << 2);
xt_ints_off(1 << 3);
ints = xthal_get_intenable();
__dsp_printf("2) xthal_get_intenable 0x%xn", ints);
}
~~~
that gives me
~~~
1) xthal
getintenable 0x4
2) xthal
getintenable 0x0
~~~
So it would seem that the interrupt is OFF.
Unfortunately
_frxt_dispatch
keeps running.
Am I making a mistake?
Would it be possible to have you guys double check this, please?
Thanks in advance
guido