Hello,
I have Timer1 set with a period of 20us. I post a semaphore in the timer function as well as toggle a port pin as a test. The pending semaphore is in a high priority task. It's taking almost 13us from when the semaphore is posted until the pending semaphore in the task stops blocking. This seems like a long time. I would expect just a few microseconds. Is this a normal?
static void timer1(UArg arg)
{
HWREG(GPIO_PORTN_BASE + ((GPIO_PIN_2 << 2))) = 4;
HWREG(GPIO_PORTN_BASE + ((GPIO_PIN_2 << 2))) = 0;
Semaphore_post(sem1);
}
static void mainTaskFxn(UArg arg0, UArg arg1)
{
while (1)
{
Semaphore_pend(sem1, BIOS_WAIT_FOREVER); // Takes 13us to unblock once posted
HWREG(GPIO_PORTN_BASE + ((GPIO_PIN_2 << 2))) = 4;
HWREG(GPIO_PORTN_BASE + ((GPIO_PIN_2 << 2))) = 0;
}
}