How do I enable or disable match events/the ME flag/the PP (parameter preload) flag in an Entry Point?


Use the intrinsic functions enable_match() and disable_match() to do this.

These functions generate no code. Look for the results in the listing file, in the entry point report following each part of the ETPU_function if()/else if()/else structure.

Enabling matches during a thread

Note: some additional entry report lines deleted for space

                                        void handler(void)
                                          if(pin == 1)
0204 4FFFFFFF   nop.                          NOP();
0208 6FFFFFFF   end.                        }
0014 40 81        00 S0A P01 ME 0204  HSR 0     lsr 1  m1 1  m2 1  pin x  flag1 x  flag0 0
0000             Thread Local RAM size
                                          else if(pin == 0)
020C 4FFFFFFF   nop.                          NOP();
0210 6FFFFFFF   end.                        }
0018 00 83        00 S0C P01 MD 020C  HSR 0     lsr 0  m1 0  m2 1  pin 0  flag1 x  flag0 0
0000             Thread Local RAM size

By default, match events are enabled.

To set or clear the PP flag, use either of the preload_p01() or preload_p23() intrinsics.