Herzog Library 00.00.01  rel_libdev.herzog.00.00.01.10606
Data Structures | Macros
clough_core.h File Reference
#include "core_cm0.h"
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  Timer_Type
 
struct  Watchdog_Type
 

Macros

#define __NVIC_PRIO_BITS   2
 
#define FLASH_BASE   ((uint32_t) 0x00000000)
 
#define SRAM_BASE   ((uint32_t) 0x20000000)
 
#define SRAM_TOP   ((uint32_t) 0x20001FFF)
 
#define PERIPH_BASE   ((uint32_t) 0x40000000)
 
#define SDIO_BASE   ((uint32_t) 0x50000000)
 
#define ASIC_7B_BASE   ((uint32_t) 0x50000000)
 
#define BTE_BASE   ((uint32_t) 0x50000080)
 
#define ASIC_16B_BASE   ((uint32_t) 0x50010000)
 
#define TIMER_BASE   ((uint32_t) 0x50020000)
 
#define FLASH_CTRL_BASE   ((uint32_t) 0x50020020)
 
#define FLASH_1ST_SECTOR   (FLASH_BASE + 0x40000)
 
#define FLASH_2ND_SECTOR   (FLASH_BASE + 0x40100)
 
#define FLASH_ACCESS_ADDR   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x00))
 
#define FLASH_PROGRESS_FLAGS   ((volatile uint8_t *) (FLASH_CTRL_BASE + 0x01))
 
#define FLASH_WRITE_DATA   ((volatile uint8_t *) (FLASH_CTRL_BASE + 0x04))
 
#define FLASH_UNLOCK_BYTE_WRITE   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x08))
 
#define FLASH_BYTE_WRITE   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x0C))
 
#define FLASH_UNLOCK_SECTOR_ERASE   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x10))
 
#define FLASH_SECTOR_ERASE   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x14))
 
#define FLASH_UNLOCK_BLOCK_ERASE   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x18))
 
#define FLASH_BLOCK_ERASE   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x1C))
 
#define FLASH_ACCESS_CFG   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x20))
 
#define CODE_PROT_REG   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x24))
 
#define CODE_PROT_PAT   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x24))
 
#define FLASH_CONFIG_W0   ((volatile uint32_t *) (FLASH_2ND_SECTOR + 0x00))
 
#define FLASH_CONFIG_W1   ((volatile uint32_t *) (FLASH_2ND_SECTOR + 0x04))
 
#define FLASH_ADK_SECTOR   ((uint32_t) (FLASH_BASE + 0x27F00 ))
 
#define BTE_CFG   ((volatile uint32_t *) (BTE_BASE + 0x00))
 
#define BTE_SFR_ADDR   ((volatile uint16_t *) (BTE_BASE + 0x00))
 
#define BTE_NUM_XFER   ((volatile uint8_t *) (BTE_BASE + 0x02))
 
#define BTE_CMD   ((volatile uint8_t *) (BTE_BASE + 0x03))
 
#define BTE_SRAM_ADDR   ((volatile uint32_t *) (BTE_BASE + 0x04))
 
#define TIMER0   ((Timer_Type *) (TIMER_BASE + 0x00))
 
#define TIMER1   ((Timer_Type *) (TIMER_BASE + 0x08))
 
#define TIMER2   ((Timer_Type *) (TIMER_BASE + 0x0C))
 
#define WATCHDOG   ((__IO Watchdog_Type *) (TIMER_BASE + 0x18))
 
#define FLASH_UNLOCK_BYTE_WRITE_KEY   ((uint32_t) 0x55555555)
 
#define FLASH_BYTE_WRITE_KEY   ((uint32_t) 0xAAAAAAAA)
 
#define FLASH_UNLOCK_BLOCK_ERASE_KEY   ((uint32_t) 0x77777777)
 
#define FLASH_BLOCK_ERASE_KEY   ((uint32_t) 0x88888888)
 
#define FLASH_UNLOCK_SECTOR_ERASE_KEY   ((uint32_t) 0x66666666)
 
#define FLASH_SECTOR_ERASE_KEY   ((uint32_t) 0x99999999)
 
#define FLASH_ADKBYTE_WRITE_KEY   ((uint32_t) 0x502901FF)
 
#define FLASH_ADKSECTOR_ERASE_KEY   ((uint32_t) 0x502901FF)
 
#define CODE_PROTECT_KEY   ((uint32_t) 0xF2E11047)
 
#define WATCHDOG_KEY0   ((uint32_t) 0x3C570001)
 
#define WATCHDOG_KEY1   ((uint32_t) 0x007F4AD6)
 
#define WATCHDOG_KEY_CLEAR   ((uint32_t) 0x00000000)
 
#define FLASH_WRITE_IN_PROGRESS   ((uint8_t) 0x01)
 
#define FLASH_SECTOR_ERASE_IN_PROGRESS   ((uint8_t) 0x02)
 
#define FLASH_BLOCK_ERASE_IN_PROGRESS   ((uint8_t) 0x04)
 
#define BTE_START_CMD   (((uint8_t) 1) << 3)
 
#define BTE_BLOCKING_XFER_CMD   (((uint8_t) 1) << 2)
 
#define BTE_WRITE_CMD   (((uint8_t) 1) << 1)
 
#define BTE_ADDR_INCR_CMD   (((uint8_t) 1) << 0)
 

Macro Definition Documentation

#define __NVIC_PRIO_BITS   2
#define ASIC_16B_BASE   ((uint32_t) 0x50010000)
#define ASIC_7B_BASE   ((uint32_t) 0x50000000)
#define BTE_ADDR_INCR_CMD   (((uint8_t) 1) << 0)
#define BTE_BASE   ((uint32_t) 0x50000080)
#define BTE_BLOCKING_XFER_CMD   (((uint8_t) 1) << 2)
#define BTE_CFG   ((volatile uint32_t *) (BTE_BASE + 0x00))
#define BTE_CMD   ((volatile uint8_t *) (BTE_BASE + 0x03))
#define BTE_NUM_XFER   ((volatile uint8_t *) (BTE_BASE + 0x02))
#define BTE_SFR_ADDR   ((volatile uint16_t *) (BTE_BASE + 0x00))
#define BTE_SRAM_ADDR   ((volatile uint32_t *) (BTE_BASE + 0x04))
#define BTE_START_CMD   (((uint8_t) 1) << 3)
#define BTE_WRITE_CMD   (((uint8_t) 1) << 1)
#define CODE_PROT_PAT   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x24))
#define CODE_PROT_REG   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x24))
#define CODE_PROTECT_KEY   ((uint32_t) 0xF2E11047)
#define FLASH_1ST_SECTOR   (FLASH_BASE + 0x40000)
#define FLASH_2ND_SECTOR   (FLASH_BASE + 0x40100)
#define FLASH_ACCESS_ADDR   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x00))
#define FLASH_ACCESS_CFG   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x20))
#define FLASH_ADK_SECTOR   ((uint32_t) (FLASH_BASE + 0x27F00 ))
#define FLASH_ADKBYTE_WRITE_KEY   ((uint32_t) 0x502901FF)
#define FLASH_ADKSECTOR_ERASE_KEY   ((uint32_t) 0x502901FF)
#define FLASH_BASE   ((uint32_t) 0x00000000)
#define FLASH_BLOCK_ERASE   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x1C))
#define FLASH_BLOCK_ERASE_IN_PROGRESS   ((uint8_t) 0x04)
#define FLASH_BLOCK_ERASE_KEY   ((uint32_t) 0x88888888)
#define FLASH_BYTE_WRITE   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x0C))
#define FLASH_BYTE_WRITE_KEY   ((uint32_t) 0xAAAAAAAA)
#define FLASH_CONFIG_W0   ((volatile uint32_t *) (FLASH_2ND_SECTOR + 0x00))
#define FLASH_CONFIG_W1   ((volatile uint32_t *) (FLASH_2ND_SECTOR + 0x04))
#define FLASH_CTRL_BASE   ((uint32_t) 0x50020020)
#define FLASH_PROGRESS_FLAGS   ((volatile uint8_t *) (FLASH_CTRL_BASE + 0x01))
#define FLASH_SECTOR_ERASE   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x14))
#define FLASH_SECTOR_ERASE_IN_PROGRESS   ((uint8_t) 0x02)
#define FLASH_SECTOR_ERASE_KEY   ((uint32_t) 0x99999999)
#define FLASH_UNLOCK_BLOCK_ERASE   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x18))
#define FLASH_UNLOCK_BLOCK_ERASE_KEY   ((uint32_t) 0x77777777)
#define FLASH_UNLOCK_BYTE_WRITE   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x08))
#define FLASH_UNLOCK_BYTE_WRITE_KEY   ((uint32_t) 0x55555555)
#define FLASH_UNLOCK_SECTOR_ERASE   ((volatile uint32_t *) (FLASH_CTRL_BASE + 0x10))
#define FLASH_UNLOCK_SECTOR_ERASE_KEY   ((uint32_t) 0x66666666)
#define FLASH_WRITE_DATA   ((volatile uint8_t *) (FLASH_CTRL_BASE + 0x04))
#define FLASH_WRITE_IN_PROGRESS   ((uint8_t) 0x01)
#define PERIPH_BASE   ((uint32_t) 0x40000000)
#define SDIO_BASE   ((uint32_t) 0x50000000)
#define SRAM_BASE   ((uint32_t) 0x20000000)
#define SRAM_TOP   ((uint32_t) 0x20001FFF)
#define TIMER0   ((Timer_Type *) (TIMER_BASE + 0x00))
#define TIMER1   ((Timer_Type *) (TIMER_BASE + 0x08))
#define TIMER2   ((Timer_Type *) (TIMER_BASE + 0x0C))
#define TIMER_BASE   ((uint32_t) 0x50020000)
#define WATCHDOG   ((__IO Watchdog_Type *) (TIMER_BASE + 0x18))
#define WATCHDOG_KEY0   ((uint32_t) 0x3C570001)
#define WATCHDOG_KEY1   ((uint32_t) 0x007F4AD6)
#define WATCHDOG_KEY_CLEAR   ((uint32_t) 0x00000000)