Hi
I modified the lwlog demo under the MQX installation folder (C:\Freescale\Freescale_MQX_4_2\mqx\examples\lwlog), put _lwlog_write in a while loop. My result is it can work with time_delay. The only difference is I use _lwlog_create , and you use _lwlog_create_at.
/* Create the lightweight log component */
result = _lwlog_create_component();
if (result != MQX_OK) {
printf("Main task: _lwlog_create_component failed.");
_task_block();
}
/* Create a log */
result = _lwlog_create(MY_LOG, 10, LOG_OVERWRITE );
if (result != MQX_OK) {
printf("Main task: _lwlog_create failed.");
_task_block();
}
c = 'd';
while (1)
{
result = _lwlog_write(MY_LOG, (_mqx_max_type)c,
(_mqx_max_type)i, 0, 0, 0, 0, 0);
if (result != MQX_OK)
printf("write failed.\r\n");
else
printf(" write success!! \r\n");
_time_delay(1000);
}
Regards
Daniel