Other Parts Discussed in Thread: AM2434
I use your new SDK mcu_plus_sdk_am243x_08_04_00_17 and I am testing HSR/PRP on AM2434
I found that hsrPrphandle->nodesTableSemaphore (in hsrPrp_red.c) is causing a deadlock.
The semaphore is used in functions RedNodetableSearchOp and RedNodetableRefresh (in hsrPrp_red_nodeTable.c) to protect from concurrent thread access.
In hsrPrp_red.c nodesTableSemaphore is initialized as 0
In RedNodetableRefresh SemaphoreP_post preceeds subsequent SemaphoreP_pend + SemaphoreP_post and everything works fine.
In RedNodetableSearchOp SemaphoreP_pend cames first, causing a deadlock, because the semaphore value is 0.
I fixed chaging the initialization code in hsrPrp_red.c so that the semaphore is initialized with value 1.
I have also removed the first SemaphoreP_post call in RedNodetableRefresh
Please provide a feedback if this solution is acceptable and if you got into the same problem also.
Looking forward
Andrea