Part Number: AM2434
Other Parts Discussed in Thread: DP83869, SYSCONFIG
Hi
we are using AM2434 - ind_comms_sdk_am243x_09_02_00_24 , We have a DAC connected with am2434 which is communicating through I2C communication. so we have created a new task for the DAC process in our EIP code implementation. As we need to control the motor speed, our DAC process task needs to be invoked in every 10ms. To achieve this, we've added a 10ms schedule, based on the system tick.
Since the PLC input is processed in the Ethernet task, and to avoid data loss, we have added the EIP task also in 10ms.
Here's the logic we've used for the 10ms run(both EIP and DAC tasks):
```c
void EI_APP_TASK_main(void* pvTaskArg_p)
{
uint32_t lastCalled = OSAL_getMsTick();
for (;;)
{
uint32_t now = OSAL_getMsTick();
uint32_t elapsed = now - lastCalled;
if (elapsed < 10) {
OSAL_SCHED_sleep(10 - elapsed);
}
lastCalled += 10; // Keeps the schedule tight
}
}
```
However, after integrating this 10ms schedule in both tasks, the network goes offline after ~2hours in a few cards that are connected in a daisy chain of 20 cards.
Interestingly, if I use `OSAL_SCHED_sleep()` in both tasks, there are no offline issues.
Could there be a problem with my tight schedule implementation?
Additionally, could you please explain the recommended approach in both tasks to resolve the offline issue?



