07-08-2020 05:15 PM - edited 07-08-2020 05:26 PM
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..
07-09-2020 07:18 PM - edited 07-09-2020 07:19 PM
I found a solution to solve this problem!
I activate "Program FPGA" on Debug Configurations.
I appreciate the interest, I really do.
07-09-2020 01:53 AM
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
07-09-2020 05:47 PM - edited 07-09-2020 06:31 PM
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.
07-09-2020 07:18 PM - edited 07-09-2020 07:19 PM
I found a solution to solve this problem!
I activate "Program FPGA" on Debug Configurations.
I appreciate the interest, I really do.