@pilot0315 said:
So you have 3 to work with.
If that is so can you say reuse the three but in different ".loops"
Yep.
Or are the three exclusive to the entire asm program.
Thanks for the explanation
The event system is hardware in each cog. It can be reused with an instruction or two for each event. There is no compiler or OS contexts, but each cog is independent of the others.
There is one known gotcha on reuse. An actively triggering event will flow through and also trigger the reconfigured event. This can be confusing, and buggy, when it would normally be armed instead of triggered. It only impacts event sources that can be asynchronous to the program flow. eg: From a pin/smartpin.
There is two workarounds: First one is to remove the event source first. This eliminates any active triggering before the new config is assigned. Eg:
setse1 #0
setse1 #%001_000000 | pin
Second one is to acknowledge any extraneous trigger after setup:
PS: When I say "actively triggering" I mean the very condition required for causing the trigger is happening on the very same sysclock tick as the event setup instruction is executing. So unlikely to occur, but still can, for edge triggered event types. Whereas it will always occur for level triggered event types.
I get it. So try to not do that as it will be bugs in your head and they will not run when the lights turn on.
Oh well.
Thanks for the explanation.
Martin
I am getting it finally.
Comments
Yep.
The event system is hardware in each cog. It can be reused with an instruction or two for each event. There is no compiler or OS contexts, but each cog is independent of the others.
There is one known gotcha on reuse. An actively triggering event will flow through and also trigger the reconfigured event. This can be confusing, and buggy, when it would normally be armed instead of triggered. It only impacts event sources that can be asynchronous to the program flow. eg: From a pin/smartpin.
There is two workarounds: First one is to remove the event source first. This eliminates any active triggering before the new config is assigned. Eg:
setse1 #0 setse1 #%001_000000 | pinSecond one is to acknowledge any extraneous trigger after setup:
setse1 #%001_000000 | pin nop ' spacing instruction before ack'ing event pollse1PS: When I say "actively triggering" I mean the very condition required for causing the trigger is happening on the very same sysclock tick as the event setup instruction is executing. So unlikely to occur, but still can, for edge triggered event types. Whereas it will always occur for level triggered event types.
I get it. So try to not do that as it will be bugs in your head and they will not run when the lights turn on.
Oh well.
Thanks for the explanation.
Martin
I am getting it finally.