AlcapDAQ
1
|
Go to the source code of this file.
Functions | |
int | bpi_flash_read (int32_t dev, uint32_t offset, uint32_t *bpi_data) |
int | bpi_flash_write (int32_t dev, uint32_t offset, uint32_t bpi_data) |
void | A3818_EnableBPIAccess (int32_t handle) |
void | A3818_EnableSPIAccess (int32_t handle) |
static uint32_t | readFlashStatus (int32_t dev) |
static uint8_t | waitUntilReady (int32_t dev, uint32_t timeout) |
static int | eraseBlock (int32_t dev, uint32_t blockAddress) |
static int | writeFlashPage (int32_t dev, uint32_t *data, int wordAddress, int numWords) |
int | readFlash (int32_t dev, uint32_t *data, int address, int length) |
unsigned int | verifyFlash (uint32_t handle, uint32_t *buffer, uint32_t bufferLength, uint32_t startWordAddress) |
int | eraseFirmware (uint32_t handle, uint32_t baseAddress, uint32_t fwcopy) |
void | writeFlash (uint32_t handle, uint32_t *buffer, uint32_t bufferLength, uint32_t startWordAddress) |
void A3818_EnableBPIAccess | ( | int32_t | handle) |
Definition at line 67 of file p30.c.
References A3818_DMISCCS, A3818_DMISCCS_SPI_BPI_FLASH_SEL, CAENVME_ReadRegister(), and CAENVME_WriteRegister().
Referenced by A3818UpgradeFromFile(), and A3818UpgradeFromMem().
void A3818_EnableSPIAccess | ( | int32_t | handle) |
Definition at line 76 of file p30.c.
References A3818_DMISCCS, A3818_DMISCCS_SPI_BPI_FLASH_SEL, CAENVME_ReadRegister(), and CAENVME_WriteRegister().
Referenced by A3818UpgradeFromFile(), and A3818UpgradeFromMem().
int bpi_flash_read | ( | int32_t | dev, |
uint32_t | offset, | ||
uint32_t * | bpi_data | ||
) |
Definition at line 11 of file p30.c.
References A3818_BPI_FLASH_AD, A3818_BPI_FLASH_CMD, A3818_BPI_FLASH_DT, CAENVME_ReadRegister(), and CAENVME_WriteRegister().
Referenced by readFlash(), and readFlashStatus().
int bpi_flash_write | ( | int32_t | dev, |
uint32_t | offset, | ||
uint32_t | bpi_data | ||
) |
Definition at line 38 of file p30.c.
References A3818_BPI_FLASH_AD, A3818_BPI_FLASH_CMD, A3818_BPI_FLASH_DT, and CAENVME_WriteRegister().
Referenced by eraseBlock(), eraseFirmware(), readFlash(), readFlashStatus(), and writeFlashPage().
|
static |
Definition at line 136 of file p30.c.
References bpi_flash_write(), P30_BLOCK_ERASE_CONFIRM, P30_BLOCK_ERASE_SETUP, P30_BLOCK_LOCK_SETUP, P30_BLOCK_UNLOCK, P30_CLEAR_STATUS, P30_READ_ARRAY, readFlashStatus(), status, and waitUntilReady().
Referenced by eraseFirmware().
int eraseFirmware | ( | uint32_t | handle, |
uint32_t | baseAddress, | ||
uint32_t | fwcopy | ||
) |
Definition at line 286 of file p30.c.
References bpi_flash_write(), eraseBlock(), i, P30_READ_ARRAY, and printf().
Referenced by A3818UpgradeFromFile(), and A3818UpgradeFromMem().
int readFlash | ( | int32_t | dev, |
uint32_t * | data, | ||
int | address, | ||
int | length | ||
) |
Definition at line 226 of file p30.c.
References bpi_flash_read(), bpi_flash_write(), i, length, and P30_READ_ARRAY.
Referenced by verifyFlash().
|
static |
Definition at line 86 of file p30.c.
References bpi_flash_read(), bpi_flash_write(), and P30_READ_STATUS.
Referenced by eraseBlock(), and waitUntilReady().
unsigned int verifyFlash | ( | uint32_t | handle, |
uint32_t * | buffer, | ||
uint32_t | bufferLength, | ||
uint32_t | startWordAddress | ||
) |
Definition at line 241 of file p30.c.
References i, printf(), and readFlash().
Referenced by A3818UpgradeFromFile(), and A3818UpgradeFromMem().
|
static |
Definition at line 122 of file p30.c.
References FALSE, mIsStatusReady, readFlashStatus(), and TRUE.
Referenced by eraseBlock(), and writeFlashPage().
void writeFlash | ( | uint32_t | handle, |
uint32_t * | buffer, | ||
uint32_t | bufferLength, | ||
uint32_t | startWordAddress | ||
) |
Definition at line 323 of file p30.c.
References printf(), and writeFlashPage().
Referenced by A3818UpgradeFromFile(), and A3818UpgradeFromMem().
|
static |
Definition at line 193 of file p30.c.
References bpi_flash_write(), i, P30_BUFFERED_PROGRAM, P30_BUFFERED_PROGRAM_CONFIRM, P30_READ_ARRAY, and waitUntilReady().
Referenced by writeFlash().