Hi, I'm still studying SYS/BIOS with EVM6678. :)
This time I want to create timer module in C code rather than in .cfg.
The following code is what I made to do 'clock_create.
Clock_Params clkprms;
Clock_Handle clkOBJ;
Error_Block eb;
platform_write("enter main()\n");
Error_init(&eb);
Clock_Params_init(&clkprms);
clkprms.period = 1; //in msec
clkprms.startFlag = TRUE;
clkprms.arg = (UArg)0x5555;
clkOBJ = Clock_create(clk_handler_function, 10, &clkprms, &eb);
if (clkOBJ == NULL) {
platform_write("clock_create() failed!\n");
BIOS_exit(0);
}
else {
platform_write("clock_create() succeeded\n");
}
Here I have some questions.
1. What if I want to create a clock that the time tick is less than 1 msec?
2. I adopted some lines from an example. But I don't know the meaning of "clkprms.arg = (UArg)0x5555;"
Does anyone know what it is?
3. in the statement "clkOBJ = Clock_create(clk_handler_function, 10, &clkprms, &eb);" , what is '10' means?
I tried to find answers here but I couldn't.
Please answer my questions or let me know the links if they were answered already.
Thank you. :)