The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
AnnaBridge
Date:
Wed Feb 20 20:53:29 2019 +0000
Revision:
172:65be27845400
Parent:
171:3a7713b1edbc
mbed library release version 165

Who changed what in which revision?

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