Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
Hi all TI experts,
I am using the AM2431 with FreeRTOS as the system, and I modified my program based on the enet_layer2_cpsw example. I’m currently encountering the following issue: I adopted the same settings as the example, where receiving an Ethernet packet triggers an interrupt. In the callback function, I release a semaphore to allow the Ethernet task to receive the packet. Everything works fine up to this point, but I have another thread where I set up a hardware timer that periodically triggers an interrupt. During the interrupt trigger, I need to control a GPIO to send a control signal. However, I’ve noticed that sometimes my hardware timer doesn’t operate at the specified time and occasionally experiences delays. I suspect that when the Ethernet thread’s interrupt is triggered, the higher-priority Ethernet interrupt preempts the process.
I’ve seen discussions suggesting that the Ethernet interrupt can be disabled, and instead, a hardware timer could be set to release the semaphore every millisecond, allowing the Ethernet thread to periodically check for packets. Under this setup, the delay issue with my other hardware timer disappears, but I prefer to use the original control method. I’d like to know if there’s a way to set the priority of the GPIO control interrupt higher than the Ethernet interrupt to avoid preemption. I tried setting the hardware timer’s priority like this:
HwiP_Params_init(&hwiPrms); hwiPrms.intNum = INTR; hwiPrms.callback = &AepwmIntrISR; hwiPrms.isPulse = INTR_IS_PULSE; hwiPrms.priority = 0x01; status = HwiP_construct(&EpwmHwiObject, &hwiPrms); DebugP_assert(status == SystemP_SUCCESS);
I set the priority from 0x01 to 0x30, but it didn’t work, and the same issue still occurs. How can I achieve the desired behavior?
Best regards,
Larry




