Tool/software: TI-RTOS
Hi Masters,
My customer is using SYS/BIOS with TM4C123GH6PZ(LM4F232H5QC) MCU and the product is T-BOX for Automotive. In this application, there are 2 Tasks, task#1 is used to process CAN packages and task#2 is used to do other jobs such as power control and so on. 2 Hardware interrupts are implemented in this application, one is GPIO, the other one is CAN interface. events are pending in Task#1 for waiting can packages. Related events are posted in CAN interface Hwi isr to wake up Task#1 for further processing. There are 2 CAN channels used in this application. The issue is that, when the CAN interupt happens with very high frequency, Task#1 will be stuck and can not be scheduled by OS for running. I suspect it is an OS issue and do following workaround: remove event post activity in the CAN HWi, replace with flag setting, and create another task#3 to check the CAN package flag with 5ms interval, if the flag is set, Task#3 will post the event that Task#1 is waiting for, this workaround can work well, but the customer still want to know the root cause, since there are some projects in mass production with the HWi triggered event architecture.
I attach a demo project that can reproduce this issue. The testing code was in pm_os.c file, there are 7 tasks and 3 system tick timer in this project. The event pending function is located in TAK_APP_POWER task, event post function was called from hwi_CAN1_fxn function in mycan.c file. Below you can also find the CAN message format that is used in this testing project:
To reproduce the issue, use a CAN massage generator to send above messages to this node with 5ms interval or smaller interval, by doing this the issue can be reproduced with less than 5min testing. I also attach the demo project.
Please help to support this case and thank you very much.
B&R
Eric
NWC FAE
https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/908/Demo.7z