36 #ifndef ti_drivers_nvs_flash_FlashWFF3__include 37 #define ti_drivers_nvs_flash_FlashWFF3__include 41 #include <ti/devices/DeviceFamily.h> 42 #include DeviceFamily_constructPath(driverlib/xip.h) 43 #include DeviceFamily_constructPath(driverlib/ospi.h) 44 #include DeviceFamily_constructPath(driverlib/debug.h) 59 #define FLASH_STATUS_SUCCESS 0x00000000 60 #define FLASH_TIMEOUT_REACHED_ERROR (-1300) 61 #define PSRAM_XIP_OFFSET (0x100) 62 #define DEVICE_SWITCH_ERROR (-1) 68 #define FLASH_WR_BOUND_SIZE_IN_BYTES 64U 70 #define FLASH_RD_BOUND_SIZE_IN_BYTES 256U 74 #define __THEN__(x) ? (x) 75 #define __ELSE__(x) : (x) 76 #define __ELSE_IF__(x) : (x) 78 #define OSPI_IDLE_XSPI_COUNTER_BEFORE_TIMEOUT 100 88 #define BITMASK_x_0(x) \ 90 __THEN__(0xFFFFFFFF) \ 91 __ELSE__((1 << ((x) + 1)) - 1)) // MACRO BITMASK_x_0() // 105 #define BITMASK_x_y(x, y) \ 107 __THEN__(BITMASK_x_0(x)) \ 108 __ELSE__(BITMASK_x_0(x) - BITMASK_x_0((y)-1))) // MACRO BITMASK_x_y(). // 131 #define FLASH_STIG_CONFIG_ENTER 0 132 #define FLASH_STIG_CONFIG_EXIT 1 133 #define FLASH_STIG_CONFIG_PRE_READ 2 134 #define FLASH_STIG_CONFIG_EXECUTE_READ 3 135 #define FLASH_STIG_CONFIG_POST_READ 4 136 #define FLASH_STIG_CONFIG_PRE_WRITE 5 137 #define FLASH_STIG_CONFIG_EXECUTE_WRITE 6 138 #define FLASH_STIG_CONFIG_POST_WRITE 7 139 #define FLASH_STIG_CONFIG_PRE_ERASE 8 140 #define FLASH_STIG_CONFIG_EXECUTE_ERASE 9 141 #define FLASH_STIG_CONFIG_POST_ERASE 10 159 void FlashRead(uint32_t *readFromAddr, uint32_t *writeToAddr, uint32_t length);
206 void FlashWrite(uint32_t *readFromAddr, uint32_t *writeToAddr, uint32_t length);
FlashOtfdeStateSet
Definition: FlashWFF3.h:110
FlashStigStatus FlashSectorErase(uint32_t eraseStartAddr, uint8_t DeviceNum)
Execute erase Flash based on STIG command.
FlashStigStatus
Definition: FlashWFF3.h:123
Definition: FlashWFF3.h:112
Definition: FlashWFF3.h:118
FlashStigStatus FlashReadSTIG(uint32_t readStartAddr, uint32_t *writeToAddr, uint8_t DeviceNum)
Read from external memory using STIG command.
Definition: FlashWFF3.h:126
FlashStigStatus FlashWriteSTIG(uint32_t *readFromAddr, uint32_t *writeToAddr, uint8_t DeviceNum)
Write to external memory using STIG command.
Definition: FlashWFF3.h:113
Definition: FlashWFF3.h:125
uint32_t FlashExecutePolling(void)
read flash status register until WIP (write in process) indication is free.
uint32_t FlashIsXspiIdle()
xSPI (accessible) idle check before STIG execution.
FlashStigStatus FlashExecuteWriteSTIGCommand(uint32_t srcWriteData, uint32_t srcWriteAddrPhy)
Execute write to Flash based on STIG write command.
void FlashWrite(uint32_t *readFromAddr, uint32_t *writeToAddr, uint32_t length)
Write to external memory.
FlashStigStatus FlashExecuteEraseSTIGCommand(uint32_t EraseAddr_en, uint32_t srcEraseAddr)
Execute erase Flash based on STIG command.
FlashUdmaJobStatus
Definition: FlashWFF3.h:116
FlashStigStatus FlashExecuteReadSTIGCommand(uint32_t srcReadAddr, uint32_t *writeToAddr)
Execute read of one word from Flash based on STIG write command.
void FlashRead(uint32_t *readFromAddr, uint32_t *writeToAddr, uint32_t length)
Read from external memory.
Definition: FlashWFF3.h:119
Definition: FlashWFF3.h:127
void FlashSetOTFDE(uint8_t setState)
Enable/Disable the OTFDE.
void FlashSetTickPeriod(uint32_t TickPeriod)
Store the ClockP period internally.