cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
757 Views
Registered: ‎07-06-2018

Zynq FreeRTOS: not getting timer tick

I am using SDK ver 2018.2

I am trying to get a FreeRTOS application up and going on a Zynq part and am not getting the timer tick. I am not sure what I am missing.  

Here are my prvSetupHardware and main functions.  I have confirmed that FreeRTOS_SetupTickInterrupt() in portZynq7000.c is being called from vTaskStartScheduler().  

 

void prvSetupHardware(void)
{
BaseType_t xStatus;
XScuGic_Config* pxGICConfig;

/* Ensure no interrupts execute while the scheduler is in an inconsistent
state. Interrupts are automatically enabled when the scheduler is
started. */
portDISABLE_INTERRUPTS();

/* Obtain the configuration of the GIC. */
pxGICConfig = XScuGic_LookupConfig(XPAR_SCUGIC_SINGLE_DEVICE_ID);

/* Sanity check the FreeRTOSConfig.h settings are correct for the
hardware. */
configASSERT(pxGICConfig);
configASSERT(pxGICConfig->CpuBaseAddress ==(configINTERRUPT_CONTROLLER_BASE_ADDRESS + configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET));
configASSERT(pxGICConfig->DistBaseAddress == configINTERRUPT_CONTROLLER_BASE_ADDRESS);

/* Install a default handler for each GIC interrupt. */
xStatus = XScuGic_CfgInitialize(&xInterruptController, pxGICConfig, pxGICConfig->CpuBaseAddress);
configASSERT(xStatus == XST_SUCCESS);
(void)xStatus; /* Remove compiler warning if configASSERT() is not defined. */

/* The Xilinx projects use a BSP that do not allow the start up code to be
altered easily. Therefore the vector table used by FreeRTOS is defined in
FreeRTOS_asm_vectors.S, which is part of this project. Switch to use the
FreeRTOS vector table. */
vPortInstallFreeRTOSVectorTable();
}


int main()
{
prvSetupHardware();

xTaskCreate(test_task, "test1", 1024, NULL, tskIDLE_PRIORITY+1, &test_handle);
xTaskCreate(test_task, "test2", 1024, NULL, tskIDLE_PRIORITY+2, &test_handle);

vTaskStartScheduler();

while(1);
}

 

0 Kudos
Reply
0 Replies