Usage of "nop", "e_nop" and "se_nop" on MPC5xxx and S32R2xx

Document created by Oliver Tian Employee on Jul 2, 2020
Version 1Show Document
  • View in full screen mode


   If you want to do nothing on MCU, no-operation is used generally. 

   Additional mnemonics are provided for the preferred forms of no-op, like nop, e_nop, se_nop. (Where the semantics are similar but the binary encoding differ, the standard mnemonic is typically preceded with an e_ to denote a VLE instruction. To distinguish between similar instructions available in both 16- and 32-bit forms under VLE and standard instructions, VLE instructions encoded with 16 bits have an se_ prefix.)


   When you compile these code within IDE, you can get the results as below.

The code could run correctly except __asm__ ("nop").  Some MPC5xxx will stop at __asm__ ("nop").


"nop"         gives Book E NOP instruction which isn't valid on VLE only cores.

"e_nop"     gives 32bit VLE instruction.

"se_nop"   gives 16bit VLE instruction.


Based on the summary within AN4802 (thanks for Randy Dee's working), Qorivva MPC57xx e200zx Core Differences, Book E is not supported by MPC57xx. VLE instruction set is supported only.


This is the reason that user should use "e_nop" or "se_nop" except "nop" on MPC57xx or S32R2xx.