xmos / lib_xua

XMOS USB Audio
Other
17 stars 13 forks source link

Master clock port sharing could cause a resource dependency exception #54

Closed larry-xmos closed 5 years ago

larry-xmos commented 6 years ago

Audio hub and PDM microphone tasks share master clock port. There are instructions during the setting up of clock blocks and ports in these tasks that take the master clock port's resource ID as an operand. Two of these could theoretically execute close to each other and cause a resource trap.

To prevent this I would suggest serialising the setup sequences of the two tasks.

xross commented 6 years ago

This is already done on master which also avoids the unsafe

xross commented 5 years ago

https://github.com/xmos/lib_xua/commit/a8562ad56a7287f77f83a8bc1e024947a2af6a04