![]() |
ADI iSensor FX3 Firmware
v2.9.4-pub
Firmware for the Analog Devices EVAL-ADIS-FX3 IMU Evaluation Platform. This firmware can be compiled using the Cypress EZ USB Suite IDE
|
Header file for FX3 flash interfacing module. More...
Go to the source code of this file.
Macros | |
#define | FLASH_PAGE_SIZE 0x40 |
#define | FLASH_TIMEOUT_MS 5000 |
Functions | |
CyU3PReturnStatus_t | AdiFlashInit () |
Initializes flash memory interface module. More... | |
void | AdiFlashDeInit () |
De-init the flash memory interfacing module. More... | |
void | AdiFlashWrite (uint32_t Address, uint16_t NumBytes, uint8_t *WriteBuf) |
Write a block of memory to flash, at the specified byte address. More... | |
void | AdiFlashRead (uint32_t Address, uint16_t NumBytes, uint8_t *ReadBuf) |
Read a block of memory from flash, at the specified byte address. More... | |
void | AdiFlashReadHandler (uint32_t Address, uint16_t NumBytes) |
Handles flash read requests from control endpoint. More... | |
Header file for FX3 flash interfacing module.
Copyright (c) 2018-2020 Analog Devices, Inc. All Rights Reserved. This software is proprietary to Analog Devices, Inc. and its licensors.
THIS SOFTWARE UTILIZES LIBRARIES DEVELOPED AND MAINTAINED BY CYPRESS INC. THE LICENSE INCLUDED IN THIS REPOSITORY DOES NOT EXTEND TO CYPRESS PROPERTY.
Use of this file is governed by the license agreement included in this repository.
#define FLASH_PAGE_SIZE 0x40 |
Page size for attached i2c flash memory (64 bytes)
#define FLASH_TIMEOUT_MS 5000 |
Flash operation timeout
void AdiFlashDeInit | ( | ) |
De-init the flash memory interfacing module.
This functions destroys the DMA channels used for interfacing with the I2C module, and re-inits the I2C controller to operate in register mode, with the previously selected bitrate.
CyU3PReturnStatus_t AdiFlashInit | ( | ) |
Initializes flash memory interface module.
The FX3 board features a ST m24m02-dr I2C EEPROM. This function initializes the FX3 I2C block to operate in DMA mode with the max supported I2C clock. It then configures the I2C Rx and Tx channels to perform a transfer
void AdiFlashRead | ( | uint32_t | Address, |
uint16_t | NumBytes, | ||
uint8_t * | ReadBuf | ||
) |
Read a block of memory from flash, at the specified byte address.
Address | The start address (in flash) to perform the read operation from |
NumBytes | The number of bytes to read from the flash |
ReadBuf | RAM buffer to read flash data into |
This function leaves the I2C EEPROM write functionality disabled. This prevents inadvertent writes from being processed.
void AdiFlashReadHandler | ( | uint32_t | Address, |
uint16_t | NumBytes | ||
) |
Handles flash read requests from control endpoint.
Address | The byte address in flash to start reading at |
NumBytes | The number of bytes to read. Max 4KB |
The data read from flash is returned over the control endpoint. This limits a single read to 4KB. If greater than a 4KB read is needed, multiple transactions should be sent. Managing this limit is left to the higher level software sending USB commands.
void AdiFlashWrite | ( | uint32_t | Address, |
uint16_t | NumBytes, | ||
uint8_t * | WriteBuf | ||
) |
Write a block of memory to flash, at the specified byte address.
Address | The start address (in flash) to perform the write operation to |
NumBytes | The number of bytes to write to flash |
WriteBuf | RAM buffer containing data to be written to flash |
This function controls the flash write enable signal. This write enable signal is used to prevent un-intended writes the flash from user space, via I2C functions. This write enable signal is only present on the iSensor FX3 board rev C or newer, but there shouldn't be any downside to asserting it on older hardware models.