cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
333 Views
Registered: ‎05-17-2020

Uartlite interrupt in FreeRTOS

Jump to solution

Hello.

I designed HW has uartlite v2.0 in Vivado and it works well in Petalinux.

I wanna use FreeRTOS now, but I couldn't find appropriate solution or example.

I'm using cortexA53 in ZCU102.

Anybody knows about uartlite example source in FreeRTOS?

 

I saw some examples as below link

https://www.freertos.org/RTOS-Xilinx-Zynq.html 

When I saw these examples, I didn't know the proper parameters in my bsp like Device Id.

Can someone please briefly explain..

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer
Observer
238 Views
Registered: ‎05-17-2020

I found a solution to solve this problem!

I activate "Program FPGA" on Debug Configurations.

 

I appreciate the interest, I really do.

View solution in original post

ca.JPG
3 Replies
Highlighted
Explorer
Explorer
288 Views
Registered: ‎07-14-2014

Hi,

All of these parameters are generated by the tools from the hardware design when you create the various projects and BSPs. The Device IDs are usually stored in a file called xparameters.h in the include folder of the BSP.

Regards

Simon

Highlighted
Observer
Observer
249 Views
Registered: ‎05-17-2020

Hi @simdav_dlp 

Thank you for your reply.

Yeah. I checked the parameters and functions in header files.

But, When I debug my code, the application stopped at XUartLite_Initialize() function.

Would you check my code please?

#define UARTLITE_DEVICE_ID XPAR_UARTLITE_0_DEVICE_ID
#define TEST_BUFFER_SIZE 64
XUartLite UartLite; 
u32 SendBuffer[TEST_BUFFER_SIZE];    
u32 RecvBuffer[TEST_BUFFER_SIZE];   


int UartLitePolledExample(u16 DeviceId){
int Status; Status = XUartLite_Initialize(&UartLite, DeviceId);
xil_printf("AAAAAAAAAAAAA\n\r"); if (Status != XST_SUCCESS) { xil_printf("Fail\n\r"); return XST_FAILURE; } xil_printf("Uartlite Initialized\n\r"); }


int main(){
int Status;
Status = UartLitePolledExample(UARTLITE_DEVICE_ID);
if(Status != XST_SUCCESS)
return XST_FAILURE;
}

The code was stopped at "static INLINE void Xil_Out16(UINTPTR Addr, u16 Value)" in "xil_io.h" 

and this function is from 

"return XUartLite_CfgInitialize(InstancePtr, ConfigPtr, ConfigPtr->RegBaseAddr);"

in "int XUartLite_Initialize(XUartLite *InstancePtr, u16 DeviceId)"

 

This code can't print "AAAAAAAAAAAAA" and "Uartlite Initialized" now.

 

0 Kudos
Highlighted
Observer
Observer
239 Views
Registered: ‎05-17-2020

I found a solution to solve this problem!

I activate "Program FPGA" on Debug Configurations.

 

I appreciate the interest, I really do.

View solution in original post

ca.JPG