Has anyone had any success using the FreeRTOS variant of OSA? I am starting to become concerned. I realize things like stack overflows can wreck havoc, and bad behavior is more likely my own fault then the common code's, but I am just seeing strange behavior. I have an OSA wait call that is requesting a 4 tick wait but is not waiting but returning immediately and is throwing a high priority task into an endless loop. That is just strange.
I might feel a little better if other folks are having success.
Should I consider using the MQX flavor of OSA, or just MQX outright? Folks having more success using it?
Thanks!
Can you please post the implementation (source code) of the FreeRTOS version of the OSA function you are calling, and also the line of code where you are calling the function.
Does the OSA function expect you to pass a time in ticks, or milliseconds, or microcseconds?
Regards,
K. Let me do a little poking around first. BTW, I am on Kinetis SDK 1.1.0 and FreeRTOS V8.0.1.
The Freescale OSA takes msec as input but translates it into clock ticks. I confirmed that my delay is correctly translated into a "wait 4 ticks" call to FreeRTOS.
Would there by ANY logical explanation as to why the following call, with the parameters translated into 4 ticks, return immediately as opposed to returning after the 4 ticks? The OS is set to preemptive, BTW.
/*FUNCTION**********************************************************************
*
* Function Name : OSA_TimeDelay
* Description : This function is used to delay for a number of milliseconds.
*
*END**************************************************************************/
void OSA_TimeDelay(uint32_t delay)
{
vTaskDelay(delay/portTICK_RATE_MS);
}
Well, as I leaded with, I did find an issue where it looks like the sysTick is not firing, and did find some logic bugs. Toyed around with some criticalSection calls here and there. I changed to using the built-in FreeRTOS TaskDelayUntil() API to handle periodic tasks and got a bit further along. I actually have some initial code running but it is ugly and I still have some gremlins lurking in there. :smileysad:
I might be tempted to switch to MQX in part because it looks like a lot of good plug-ins exist within KDS that might make working with it much easier.
Would there by ANY logical explanation as to why the following call,
with the parameters translated into 4 ticks, return immediately as
opposed to returning after the 4 ticks? The OS is set to preemptive, BTW.
What is portTICK_RATE_MS calculated to be? Or a better question would
be, what is configTICK_RATE_HZ set to, as the former is calculated from
the latter.
--
Regards,
Richard.
Designed for simplicity. More than 113000 downloads in 2014.
+ http://www.FreeRTOS.org/plus
IoT, Trace, Certification, FAT FS, TCP/IP, Training, and more...