cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
8,057 Views
Registered: ‎04-04-2016

XScuGic_Connect() fails with !XIL_COMPONENT_IS_READY ?

Hello,

 

I am trying to create a simple "Blinky", FreeRTOS/AMP application. The sample AMP applications like echo_test work so I used those files as a template.

 

For some reason in my sample XScuGic_Connect() fails:

Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

 

The code: XScuGic_CfgInitialize(&xInterruptController, IntcConfig, IntcConfig->CpuBaseAddress);

Is conditional compiled out when USE_FREERTOS is defined. 

 

Where should this be initialized under FreeRTOS? 

 

Thanks

Tags (3)
0 Kudos
1 Reply
Highlighted
Observer
Observer
7,997 Views
Registered: ‎04-04-2016

Here is the answer.

 

The AMP sample applications do the low level AMP configuration within a task. This seemed weird to me so I tried to move this into prvSetupHardware(). This seemed much more logical location. What I did not realize is that when the scheduler is initialized it also initializes the GIC. To fix this all the following:

 

XScuGic_Config *IntcConfig = XScuGic_LookupConfig(INTC_DEVICE_ID);
configASSERT(NULL != IntcConfig);

 

u32 Status = XScuGic_CfgInitialize(&xInterruptController, IntcConfig, IntcConfig->CpuBaseAddress);
configASSERT(XST_SUCCESS == Status);

 

Before calling XScuGic_Connect() .

Tags (2)
0 Kudos