-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Periodic Clock just firing the first time on CC1310 #7
Comments
I confirm the issue. The |
I've found that the problem is in Clock_start(). Commenting this instruction out and setting clkParams.startFlag = TRUE makes the clock work as expected: #include <ti/sysbios/knl/Clock.h>
#include <ti/sysbios/BIOS.h>
Clock_Params clkParams;
Clock_Struct clkStruct;
Clock_Handle clkHandle;
void clkFxn(UArg arg0)
{
digitalWrite(RED_LED, !digitalRead(RED_LED));
}
void setup()
{
pinMode(RED_LED, OUTPUT);
digitalWrite(RED_LED, HIGH);
Clock_Params_init(&clkParams);
clkParams.period = 5000000/Clock_tickPeriod;
clkParams.startFlag = TRUE;
Clock_construct(&clkStruct, (Clock_FuncPtr)clkFxn, 5000000/Clock_tickPeriod, &clkParams);
//Clock_start(clkHandle);
}
void loop()
{
} |
Does that mean that the delayed launch of the Clock is no longer possible? |
Not in an asynchronous way, as you were doing with Galaxia. |
Strange, as it used to work with the |
I was using Clock_construct instead of Clock_create. |
I'm trying to create a simple periodic timer based on Clock which should fire a callback every 5 seconds:
But clkFxn is only called the first time after the initial timeout (5 sec)
The text was updated successfully, but these errors were encountered: