cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
CobusR
Visitor
Visitor
331 Views
Registered: ‎03-15-2021

FreeRTOS Echo Test Tick disabled

Jump to solution

I used Vitis to generate a echo test OpenAMP application from the template.

It seems like this applcation somehow disables the tick for FreeRTOS. When I call xTaskGetTickCount() it always returns 1.

The effect is that if I try to add a second FreeRTOS task it never gets executed.

Any ideas where or why the the tick gets disabled?

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
CobusR
Visitor
Visitor
282 Views
Registered: ‎03-15-2021

Ok, so I've found the solution.

The globlal interrupts setup by FreeRTOS gets overwritten in helper.c of the echo test example.

The solution as discussed here https://github.com/Xilinx/embeddedsw/issues/75 is the make a few changes in helper.c

1. change 

 

static XScuGic xInterruptController;

 

to

 

extern XScuGic xInterruptController;

 

 

 xInterruptController is already defined by FreeRTOS.

2. Change app_gic_initialize to

 

static int app_gic_initialize(void)
{
	XScuGic_Disable(&xInterruptController, IPI_IRQ_VECT_ID);

	/* Connect Interrupt ID with ISR */
	XScuGic_Connect(&xInterruptController, IPI_IRQ_VECT_ID,
			(Xil_ExceptionHandler)metal_xlnx_irq_isr,
			(void *)IPI_IRQ_VECT_ID);

	return 0;
}

 

 

After those change the tick count is incremented and additional tasks can run.

View solution in original post

0 Kudos
1 Reply
CobusR
Visitor
Visitor
283 Views
Registered: ‎03-15-2021

Ok, so I've found the solution.

The globlal interrupts setup by FreeRTOS gets overwritten in helper.c of the echo test example.

The solution as discussed here https://github.com/Xilinx/embeddedsw/issues/75 is the make a few changes in helper.c

1. change 

 

static XScuGic xInterruptController;

 

to

 

extern XScuGic xInterruptController;

 

 

 xInterruptController is already defined by FreeRTOS.

2. Change app_gic_initialize to

 

static int app_gic_initialize(void)
{
	XScuGic_Disable(&xInterruptController, IPI_IRQ_VECT_ID);

	/* Connect Interrupt ID with ISR */
	XScuGic_Connect(&xInterruptController, IPI_IRQ_VECT_ID,
			(Xil_ExceptionHandler)metal_xlnx_irq_isr,
			(void *)IPI_IRQ_VECT_ID);

	return 0;
}

 

 

After those change the tick count is incremented and additional tasks can run.

View solution in original post

0 Kudos