Hi,
I need to send a packet periodically with resolution of microseconds in the stack bypass mode. I have the following code:
...
Clock_Params clkParams;
/* Create a periodic Clock Instance with period = 5 system time units */
Clock_Params_init(&clkParams);
clkParams.period = 5; //80000000; // at 80MHz, 80 tics are supposed to be 1us?
clkParams.startFlag = TRUE;
clk2 = Clock_create(clk0Fxn, 5, &clkParams, NULL); //(clk0Fxn, 80000000, &clkParams, NULL); // at 80MHz, 80 tics are supposed to be 1us?
Clock_start(clk2);
BIOS_start(); /* does not return */
...
Void clk0Fxn(UArg arg0)
{
UART_PRINT("Transmiting triggered by clock.\r\n");
Status= sl_Send(socket_descriptor,RawData,sizeof(RawData),0);
Report("sl_Send_Status = %d. Data sent: %s. sizeof(RawData):%d.\n\r",Status,RawData,sizeof(RawData));
if(Status < 0)
{
UART_PRINT("Transmition Failed!\r\n");
sl_Close(socket_descriptor);
//ASSERT_ON_ERROR(__LINE__, lRetVal);
}
}
The transmitting part is working properly on its own, but the action is not being triggered by the clock. There are no errors, but the clock does not seem to start, or trigger the action. Please let me know what am I missing or if there is a better way to transmit periodically a frame in the stack bypass mode.
Thanks!