English
Language : 

K60P100M100SF2RM Datasheet, PDF (781/1809 Pages) Freescale Semiconductor, Inc – K60 Sub-Family Reference Manual
Chapter 32 Memory-Mapped Cryptographic Acceleration Unit (MMCAU)
32.6.3.23 Illegal Command (ILL)
The ILL command is a specific illegal command that sets CASR[IC]. All other illegal
commands are reserved for use in future implementations.
32.7 Application/Initialization Information
This section discusses how to initialize and use the MMCAU.
32.7.1 Code Example
A code fragment is shown below as an example of how the MMCAU is used. This
example shows the round function of the AES algorithm. Core registers are defined as
follows:
• R1 points to the key schedule
• R3 contains three direct MMCAU commands
• R8 contains two direct MMCAU commands
• R9 contains an indirect MMCAU command
• FP points to the MMCAU indirect command address space
• IP points to the MMCAU direct command space
movw
movt
movw
movt
fp, #:lower16:MMCAU_PPB_INDIRECT
fp, #:upper16:MMCAU_PPB_INDIRECT
ip, #:lower16:MMCAU_PPB_DIRECT
ip, #:upper16:MMCAU_PPB_DIRECT
@ fp -> MMCAU_PPB_INDIRECT
@ ip -> MMCAU_PPB_DIRECT
# r3 = mmcau_3_cmds(AESS+CA0,AESS+CA1,AESS+CA2)
movw r3, #:lower16:(0x80100200+(AESS+CA0)<<22+(AESS+CA1)<<11+AESS+CA2)
movt r3, #:upper16:(0x80100200+(AESS+CA0)<<22+(AESS+CA1)<<11+AESS+CA2)
# r8 = mmcau_2_cmds(AESS+CA3,AESR)
movw r8, #:lower16:(0x80100000+(AESS+CA3)<<22+(AESR)<<11)
movt r8, #:upper16:(0x80100000+(AESS+CA3)<<22+(AESR)<<11)
add
r9, fp, $((AESC+CA0)<<2)
@ r9 = mmcau_cmd(AESC+CA0)
str
str
ldmia
stmia
r3, [ip]
r8, [ip]
r1!, {r4-r7}
r9, {r4-r7}
@ sub bytes w0, w1, w2
@ sub bytes w3, shift rows
@ get next 4 keys; r1++
@ mix columns, add keys
32.7.2 Assembler Equate Values
The following equates ease programming of the MMCAU.
; CAU Registers (CAx)
K60 Sub-Family Reference Manual, Rev. 6, Nov 2011
Freescale Semiconductor, Inc.
781