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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

No ratings

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

Hello

   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.

Snipaste_2020-07-03_10-30-03.png

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.

Cheers!

Oliver

Version history
Revision #:
1 of 1
Last update:
‎07-02-2020 08:00 PM
Updated by: