ON Semiconductor / mbed-os

Dependents:   mbed-TFT-example-NCS36510 mbed-Accelerometer-example-NCS36510 mbed-Accelerometer-example-NCS36510

Committer:
group-onsemi
Date:
Wed Jan 25 20:34:15 2017 +0000
Revision:
0:098463de4c5d
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
group-onsemi 0:098463de4c5d 1 /**
group-onsemi 0:098463de4c5d 2 ******************************************************************************
group-onsemi 0:098463de4c5d 3 * @file aes_map.h
group-onsemi 0:098463de4c5d 4 * @brief AES HW register map
group-onsemi 0:098463de4c5d 5 * @internal
group-onsemi 0:098463de4c5d 6 * @author ON Semiconductor.
group-onsemi 0:098463de4c5d 7 * $Rev: 2110 $
group-onsemi 0:098463de4c5d 8 * $Date: 2013-07-16 20:13:03 +0530 (Tue, 16 Jul 2013) $
group-onsemi 0:098463de4c5d 9 ******************************************************************************
group-onsemi 0:098463de4c5d 10 * Copyright 2016 Semiconductor Components Industries LLC (d/b/a “ON Semiconductor”).
group-onsemi 0:098463de4c5d 11 * All rights reserved. This software and/or documentation is licensed by ON Semiconductor
group-onsemi 0:098463de4c5d 12 * under limited terms and conditions. The terms and conditions pertaining to the software
group-onsemi 0:098463de4c5d 13 * and/or documentation are available at http://www.onsemi.com/site/pdf/ONSEMI_T&C.pdf
group-onsemi 0:098463de4c5d 14 * (“ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software”) and
group-onsemi 0:098463de4c5d 15 * if applicable the software license agreement. Do not use this software and/or
group-onsemi 0:098463de4c5d 16 * documentation unless you have carefully read and you agree to the limited terms and
group-onsemi 0:098463de4c5d 17 * conditions. By using this software and/or documentation, you agree to the limited
group-onsemi 0:098463de4c5d 18 * terms and conditions.
group-onsemi 0:098463de4c5d 19 *
group-onsemi 0:098463de4c5d 20 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
group-onsemi 0:098463de4c5d 21 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
group-onsemi 0:098463de4c5d 22 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
group-onsemi 0:098463de4c5d 23 * ON SEMICONDUCTOR SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL,
group-onsemi 0:098463de4c5d 24 * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
group-onsemi 0:098463de4c5d 25 * @endinternal
group-onsemi 0:098463de4c5d 26 *
group-onsemi 0:098463de4c5d 27 * @ingroup aes
group-onsemi 0:098463de4c5d 28 *
group-onsemi 0:098463de4c5d 29 * @details
group-onsemi 0:098463de4c5d 30 * <p>
group-onsemi 0:098463de4c5d 31 * AES HW register map description
group-onsemi 0:098463de4c5d 32 * </p>
group-onsemi 0:098463de4c5d 33 */
group-onsemi 0:098463de4c5d 34
group-onsemi 0:098463de4c5d 35 #if defined ( __CC_ARM )
group-onsemi 0:098463de4c5d 36 #pragma anon_unions
group-onsemi 0:098463de4c5d 37 #endif
group-onsemi 0:098463de4c5d 38
group-onsemi 0:098463de4c5d 39 #ifndef AES_MAP_H_
group-onsemi 0:098463de4c5d 40 #define AES_MAP_H_
group-onsemi 0:098463de4c5d 41
group-onsemi 0:098463de4c5d 42 #include "architecture.h"
group-onsemi 0:098463de4c5d 43
group-onsemi 0:098463de4c5d 44 /** AES Encryption HW Structure Overlay */
group-onsemi 0:098463de4c5d 45 typedef struct {
group-onsemi 0:098463de4c5d 46 __IO uint32_t KEY0; /**< Bits[31:00] of the 128-bit key */
group-onsemi 0:098463de4c5d 47 __IO uint32_t KEY1; /**< Bits[63:32] of the 128-bit key */
group-onsemi 0:098463de4c5d 48 __IO uint32_t KEY2; /**< Bits[95:64] of the 128-bit key */
group-onsemi 0:098463de4c5d 49 __IO uint32_t KEY3; /**< Bits[127:96] of the 128-bit key */
group-onsemi 0:098463de4c5d 50 __IO uint32_t KEY4; /**< Bits[159:128] of the 256-bit key */
group-onsemi 0:098463de4c5d 51 __IO uint32_t KEY5; /**< Bits[191:160] of the 256-bit key */
group-onsemi 0:098463de4c5d 52 __IO uint32_t KEY6; /**< Bits[223:192] of the 256-bit key */
group-onsemi 0:098463de4c5d 53 __IO uint32_t KEY7; /**< Bits[255:224] of the 256-bit key */
group-onsemi 0:098463de4c5d 54
group-onsemi 0:098463de4c5d 55 __IO uint32_t CNTi0; /**< Bits[31:00] of the 128-bit counter value used in counter mode */
group-onsemi 0:098463de4c5d 56 __IO uint32_t CNTi1; /**< Bits[63:32] of the 128-bit counter value used in counter mode */
group-onsemi 0:098463de4c5d 57 __IO uint32_t CNTi2; /**< Bits[95:64] of the 128-bit counter value used in counter mode */
group-onsemi 0:098463de4c5d 58 __IO uint32_t CNTi3; /**< Bits[127:96] of the 128-bit counter value used in counter mode */
group-onsemi 0:098463de4c5d 59 __I uint32_t CNTo0; /**< Bits[31:00] of the 128-bit counter result */
group-onsemi 0:098463de4c5d 60 __I uint32_t CNTo1; /**< Bits[63:32] of the 128-bit counter result */
group-onsemi 0:098463de4c5d 61 __I uint32_t CNTo2; /**< Bits[95:64] of the 128-bit counter result */
group-onsemi 0:098463de4c5d 62 __I uint32_t CNTo3; /**< Bits[127:96] of the 128-bit counter result */
group-onsemi 0:098463de4c5d 63
group-onsemi 0:098463de4c5d 64 __I uint32_t CBCo0; /**< Bits[31:00] of the 128-bit CBC result */
group-onsemi 0:098463de4c5d 65 __I uint32_t CBCo1; /**< Bits[63:32] of the 128-bit CBC result */
group-onsemi 0:098463de4c5d 66 __I uint32_t CBCo2; /**< Bits[95:64] of the 128-bit CBC result */
group-onsemi 0:098463de4c5d 67 __I uint32_t CBCo3; /**< Bits[127:96] of the 128-bit CBC result */
group-onsemi 0:098463de4c5d 68 union {
group-onsemi 0:098463de4c5d 69 struct {
group-onsemi 0:098463de4c5d 70 __IO uint32_t START:1; /**< start the encryption : 0 = no-effect , 1 = enable */
group-onsemi 0:098463de4c5d 71 __IO uint32_t ACC_CLR:1; /**< Clear the CBC accumulator : 0 = no-effect 1 = clears the CBC accumulator */
group-onsemi 0:098463de4c5d 72 __IO uint32_t INT_CLEAR:1; /**< interrupt clear : 0 = no-effect 1 = clear the interrupt */
group-onsemi 0:098463de4c5d 73 } BITS;
group-onsemi 0:098463de4c5d 74 __IO uint32_t WORD;
group-onsemi 0:098463de4c5d 75 } CTL;
group-onsemi 0:098463de4c5d 76 union {
group-onsemi 0:098463de4c5d 77 struct {
group-onsemi 0:098463de4c5d 78 __IO uint32_t CBC_MODE:1; /**< counter mode : 0 = counter mode , 1 = CBC mode */
group-onsemi 0:098463de4c5d 79 __IO uint32_t BYPASS:1; /**< encryption : 0 = Normal Mode , 1 = Bypasss any encryption */
group-onsemi 0:098463de4c5d 80 __IO uint32_t INT_EN:1; /**< interrupt mask : 0 = disabled 1 = enabled */
group-onsemi 0:098463de4c5d 81 __IO uint32_t KEY_LENGTH:1; /**< Key Length: 0 = 128 Bit Encryption 1 = 256 Bit Encryption */
group-onsemi 0:098463de4c5d 82
group-onsemi 0:098463de4c5d 83 } BITS;
group-onsemi 0:098463de4c5d 84 __IO uint32_t WORD;
group-onsemi 0:098463de4c5d 85 } MODE;
group-onsemi 0:098463de4c5d 86 union {
group-onsemi 0:098463de4c5d 87 struct {
group-onsemi 0:098463de4c5d 88 __I uint32_t COMPLETE:1;/**< status : 0 = not complete , 1 = complete */
group-onsemi 0:098463de4c5d 89 } BITS;
group-onsemi 0:098463de4c5d 90 __IO uint32_t WORD;
group-onsemi 0:098463de4c5d 91 } STAT;
group-onsemi 0:098463de4c5d 92
group-onsemi 0:098463de4c5d 93 __O uint32_t MAC_INIT0; /**< Bits[31:00] of the CBC Initialization Vector */
group-onsemi 0:098463de4c5d 94 __O uint32_t MAC_INIT1; /**< Bits[63:32] of the CBC Initialization Vector */
group-onsemi 0:098463de4c5d 95 __O uint32_t MAC_INIT2; /**< Bits[95:64] of the CBC Initialization Vector */
group-onsemi 0:098463de4c5d 96 __O uint32_t MAC_INIT3; /**< Bits[127:96] of the CBC Initialization Vector */
group-onsemi 0:098463de4c5d 97
group-onsemi 0:098463de4c5d 98 __IO uint32_t RESERVED;
group-onsemi 0:098463de4c5d 99 __O uint32_t DATA0; /**< Bits[31:00] of the 128-bit data to encrypt */
group-onsemi 0:098463de4c5d 100 __O uint32_t DATA1; /**< Bits[63:32] of the 128-bit data to encrypt */
group-onsemi 0:098463de4c5d 101 __O uint32_t DATA2; /**< Bits[95:64] of the 128-bit data to encrypt */
group-onsemi 0:098463de4c5d 102 __O uint32_t DATA3; /**< Bits[127:96] of the 128-bit data to encrypt */
group-onsemi 0:098463de4c5d 103 } AesReg_t, *AesReg_pt;
group-onsemi 0:098463de4c5d 104
group-onsemi 0:098463de4c5d 105 #endif /* AES_MAP_H_ */