Functions | |
| cy_en_rram_status_t | Cy_RRAM_OtpWriteByteArray (RRAMC_Type *base, uint32_t addr, const uint8_t *data, uint32_t numBytes) |
| Writes array of byte data to the specified address. More... | |
| cy_en_rram_status_t | Cy_RRAM_OtpReadByteArray (RRAMC_Type *base, uint32_t addr, uint8_t *data, uint32_t numBytes) |
| Reads array of byte data from the specified address. More... | |
| cy_en_rram_status_t | Cy_RRAM_OtpWriteWord (RRAMC_Type *base, uint32_t addr, uint32_t data) |
| Writes a 32-bit word data to the specified address. More... | |
| cy_en_rram_status_t | Cy_RRAM_OtpReadWord (RRAMC_Type *base, uint32_t addr, uint32_t *data) |
| Reads a 32bit word data from the specified address. More... | |
| cy_en_rram_status_t | Cy_RRAM_OtpWriteBlock (RRAMC_Type *base, uint32_t addr, uint8_t *data) |
| Writes a block(16B) data to the specified address. More... | |
| cy_en_rram_status_t | Cy_RRAM_NvmWriteByteArray (RRAMC_Type *base, uint32_t addr, const uint8_t *data, uint32_t numBytes) |
| Writes array of byte data to the specified address in blocking mode. More... | |
| cy_en_rram_status_t | Cy_RRAM_NvmReadByteArray (RRAMC_Type *base, uint32_t addr, uint8_t *data, uint32_t numBytes) |
| Reads array of byte data from the specified address. More... | |
| cy_en_rram_status_t | Cy_RRAM_NonBlockingNvmWriteByteArray (RRAMC_Type *base, uint32_t addr, const uint8_t *data, uint32_t numBytes) |
| Writes array of byte data to the specified address in Non Blocking mode. More... | |
| cy_en_rram_status_t | Cy_RRAM_NvmWriteBlock (RRAMC_Type *base, uint32_t addr, uint8_t *data) |
| Writes a block(16B) data to the specified address. More... | |
| cy_en_rram_status_t | Cy_RRAM_WriteByteArray (RRAMC_Type *base, uint32_t addr, const uint8_t *data, uint32_t numBytes) |
| Writes array of byte data to the specified address in blocking mode. More... | |
| cy_en_rram_status_t | Cy_RRAM_TSWriteByteArray (RRAMC_Type *base, uint32_t addr, const uint8_t *data, uint32_t numBytes) |
| Writes an array of byte data to the specified address in blocking mode without considering uncorrectable ECC fail error. More... | |
| cy_en_rram_status_t | Cy_RRAM_ReadByteArray (RRAMC_Type *base, uint32_t addr, uint8_t *data, uint32_t numBytes) |
| Reads an array of byte data from the specified address. More... | |
| cy_en_rram_status_t | Cy_RRAM_TSReadByteArray (RRAMC_Type *base, uint32_t addr, uint8_t *data, uint32_t numBytes) |
| Reads an array of byte data from the specified address after validating the uncorrectable ECC fail bits. More... | |
| cy_en_rram_status_t | Cy_RRAM_Init (RRAMC_Type *base, cy_en_rram_vmode_t vmode, bool retrvAlgoInfo) |
| Retrieves configuration settings from configuration space in extra area. More... | |
| __STATIC_INLINE uint32_t | Cy_RRAM_GetStatus (RRAMC_Type *base) |
| Get the status of RRAM. More... | |
| __STATIC_INLINE bool | Cy_RRAM_IsBusy (RRAMC_Type *base) |
| Indicates the status of NVM Busy flag. More... | |
| __STATIC_INLINE cy_en_rram_hresp_t | Cy_RRAM_GetAHBError (RRAMC_Type *base) |
| Gets AHB bus error occurred during transactions. More... | |
| __STATIC_INLINE void | Cy_RRAM_EnableSleepMode (RRAMC_Type *base) |
| Puts RRAM in Sleep mode. More... | |
| __STATIC_INLINE void | Cy_RRAM_DisableSleepMode (RRAMC_Type *base) |
| Puts RRAM in Normal mode. More... | |
| __STATIC_INLINE cy_en_rram_sleep_t | Cy_RRAM_GetSleepStatus (RRAMC_Type *base) |
| Gets the sleep status of RRAM. More... | |
| cy_en_rram_status_t | Cy_RRAM_EnableWP (RRAMC_Type *base, uint32_t numSectors) |
| Enables write protection for number of sectors starting with sector 0 in RRAM NVM region. More... | |
| cy_en_rram_status_t | Cy_RRAM_DisableWP (RRAMC_Type *base) |
| Disables write protection for all sectors in RRAM NVM region. More... | |
| __STATIC_INLINE void | Cy_RRAM_SetWPLock (RRAMC_Type *base) |
| Enables the write protection lock by setting WPLCK to 1. More... | |
| __STATIC_INLINE cy_en_rram_wp_lock_t | Cy_RRAM_GetWPLockState (RRAMC_Type *base) |
| Gets the state of write protection lock. More... | |
| __STATIC_INLINE void | Cy_RRAM_SetVoltageMode (RRAMC_Type *base, cy_en_rram_vmode_t vmode) |
| Set voltage/frequency mode. More... | |
| __STATIC_INLINE cy_en_rram_vmode_t | Cy_RRAM_GetVoltageMode (RRAMC_Type *base) |
| Get voltage/frequency mode. More... | |
| __STATIC_INLINE void | Cy_RRAM_SetTemperature (RRAMC_Type *base, cy_en_rram_temperature_t temperature) |
| Set junction temperature. More... | |
| __STATIC_INLINE cy_en_rram_temperature_t | Cy_RRAM_GetTemperature (RRAMC_Type *base) |
| Get junction temperature. More... | |
| cy_en_rram_status_t | Cy_RRAM_SetProtLockableRegion (RRAMC_Type *base, uint32_t regionSize) |
| Sets the size of lockable region in PROTECTED_NVM region. More... | |
| __STATIC_INLINE uint32_t | Cy_RRAM_GetProtLockableRegion (RRAMC_Type *base) |
| Gets the size of configured lockable region in PROTECTED_NVM region. More... | |
| __STATIC_INLINE void | Cy_RRAM_SetProtLock (RRAMC_Type *base) |
| Enables the lock for the configured PROTECTED_NVM region Cy_RRAM_SetProtLockableRegion(). More... | |
| __STATIC_INLINE cy_en_rram_protected_lock_t | Cy_RRAM_GetProtLockState (RRAMC_Type *base) |
| Get the lock state of the PROTECTED_NVM Lockable region. More... | |
| __STATIC_INLINE void | Cy_RRAM_SetUDSLock (RRAMC_Type *base) |
| Enables the lock to avoid access to UDS key. More... | |
| __STATIC_INLINE cy_en_rram_uds_lock_t | Cy_RRAM_GetUDSLockState (RRAMC_Type *base) |
| Get the status of UDS lock. More... | |
| __STATIC_INLINE void | Cy_RRAM_SetUDSConfig (RRAMC_Type *base, bool config) |
| Configure UDS to trigger a AHB error or read as zero without error when there is a read access to UDS. More... | |
| __STATIC_INLINE void | Cy_RRAM_ForceRelPCLock (RRAMC_Type *base) |
| Release PC lock forcefully. More... | |
| cy_en_rram_status_t Cy_RRAM_OtpWriteByteArray | ( | RRAMC_Type * | base, |
| uint32_t | addr, | ||
| const uint8_t * | data, | ||
| uint32_t | numBytes | ||
| ) |
Writes array of byte data to the specified address.
This function tries to acquire the lock. If the lock is not available, then it returns immediately with CY_RRAM_ACQUIRE_PC_LOCK_FAIL error.
| base | The pointer to the RRAMC instance. |
| addr | Address of the OTP subsection. The address should fall in General OTP or Protected OTP subsection. |
| data | Pointer to the data to be written to the specified address. |
| numBytes | Number of bytes to be written. |
The address should fall in General OTP or Protected OTP subsection.
| cy_en_rram_status_t Cy_RRAM_OtpReadByteArray | ( | RRAMC_Type * | base, |
| uint32_t | addr, | ||
| uint8_t * | data, | ||
| uint32_t | numBytes | ||
| ) |
Reads array of byte data from the specified address.
| base | The pointer to the RRAMC instance. |
| addr | Address of the OTP subsection. The address should fall in General OTP or Protected OTP subsection. |
| data | Pointer to the destination where the read data is stored. |
| numBytes | Number of bytes to be read. |
The address should fall in General OTP or Protected OTP subsection.
| cy_en_rram_status_t Cy_RRAM_OtpWriteWord | ( | RRAMC_Type * | base, |
| uint32_t | addr, | ||
| uint32_t | data | ||
| ) |
Writes a 32-bit word data to the specified address.
This function tries to acquire the lock. If the lock is not available, then it returns immediately with CY_RRAM_ACQUIRE_PC_LOCK_FAIL error.
| base | The pointer to the RRAMC instance. |
| addr | Address of the OTP subsection. The address should fall in General OTP or Protected OTP subsection. |
| data | Data to be written to the specified address. |
The address should fall in General OTP or Protected OTP subsection.
| cy_en_rram_status_t Cy_RRAM_OtpReadWord | ( | RRAMC_Type * | base, |
| uint32_t | addr, | ||
| uint32_t * | data | ||
| ) |
Reads a 32bit word data from the specified address.
| base | The pointer to the RRAMC instance. |
| addr | Address of the OTP subsection. The address should fall in General OTP or Protected OTP subsection. |
| data | Pointer to the destination where the read word is stored. |
The address should fall in General OTP or Protected OTP subsection.
| cy_en_rram_status_t Cy_RRAM_OtpWriteBlock | ( | RRAMC_Type * | base, |
| uint32_t | addr, | ||
| uint8_t * | data | ||
| ) |
Writes a block(16B) data to the specified address.
Assumption is that the provided address is block aligned. This function tries to acquire the lock. If the lock is not available, then it returns immediately with CY_RRAM_ACQUIRE_PC_LOCK_FAIL error.
| base | The pointer to the RRAMC instance. |
| addr | Address of the OTP subsection. The address should fall in General OTP or Protected OTP subsection. |
| data | Pointer to the data to be written to the specified address. |
The address should be block aligned. The address should fall in General OTP or Protected OTP subsection.
| cy_en_rram_status_t Cy_RRAM_NvmWriteByteArray | ( | RRAMC_Type * | base, |
| uint32_t | addr, | ||
| const uint8_t * | data, | ||
| uint32_t | numBytes | ||
| ) |
Writes array of byte data to the specified address in blocking mode.
API will wait for the write operation to be completed. It returns error or success status. This function tries to acquire the lock. If the lock is not available, then it returns immediately with CY_RRAM_ACQUIRE_PC_LOCK_FAIL error.
| base | The pointer to the RRAMC instance. |
| addr | Address of the NVM subsection. The address should fall in Main or Work or Sflash or Protected NVM subsection. |
| data | Pointer to the data to be written to the specified address. |
| numBytes | Number of bytes to be written. |
The address should fall in Main or Work or Sflash or Protected NVM subsection.
| cy_en_rram_status_t Cy_RRAM_NvmReadByteArray | ( | RRAMC_Type * | base, |
| uint32_t | addr, | ||
| uint8_t * | data, | ||
| uint32_t | numBytes | ||
| ) |
Reads array of byte data from the specified address.
| base | The pointer to the RRAMC instance. |
| addr | Address of the NVM subsection. The address should fall in Main or Work or Sflash or Protected NVM subsection. |
| data | Pointer to the destination where the read data is stored. |
| numBytes | Number of bytes to be read. |
The address should fall in Main, Work, Sflash, Protected NVM subsection.
| cy_en_rram_status_t Cy_RRAM_NonBlockingNvmWriteByteArray | ( | RRAMC_Type * | base, |
| uint32_t | addr, | ||
| const uint8_t * | data, | ||
| uint32_t | numBytes | ||
| ) |
Writes array of byte data to the specified address in Non Blocking mode.
API will only validate parameter and performs write operation. User needs to call Cy_RRAM_GetStatus() to check the status of write operation. This function tries to acquire the lock. If the lock is not available, then it returns immediately with CY_RRAM_ACQUIRE_PC_LOCK_FAIL error.
| base | The pointer to the RRAMC instance. |
| addr | Address of the NVM subsection. The address should fall in Main or Work or Sflash or Protected NVM subsection. |
| data | Pointer to the data to be written to the specified address. |
| numBytes | Number of bytes to be written. |
The address should fall in Main or Work or Sflash or Protected NVM subsection.
| cy_en_rram_status_t Cy_RRAM_NvmWriteBlock | ( | RRAMC_Type * | base, |
| uint32_t | addr, | ||
| uint8_t * | data | ||
| ) |
Writes a block(16B) data to the specified address.
Assumption is that the provided address is Block aligned. This function tries to acquire the lock. If the lock is not available, then it returns immediately with CY_RRAM_ACQUIRE_PC_LOCK_FAIL error.
| base | The pointer to the RRAMC instance. |
| addr | Address of the NVM subsection. The address should fall in Main or Work or Sflash or Protected NVM subsection. |
| data | Pointer to the data to be written to the specified address. |
Writes a block(16B) data to the specified address.
The address should fall in Main or Work or Sflash or Protected NVM subsection.
| cy_en_rram_status_t Cy_RRAM_WriteByteArray | ( | RRAMC_Type * | base, |
| uint32_t | addr, | ||
| const uint8_t * | data, | ||
| uint32_t | numBytes | ||
| ) |
Writes array of byte data to the specified address in blocking mode.
API will wait for the write operation to be completed. It returns error or success status. This function tries to acquire the lock. If the lock is not available, then it returns immediately with CY_RRAM_ACQUIRE_PC_LOCK_FAIL error.
| base | The pointer to the RRAMC instance. |
| addr | Address of RRAM memory. The provided address should fall under one of the NVM or OTP sub sections otherwise bad parameter error will be returned. |
| data | Pointer to the data to be written to the specified address. |
| numBytes | Number of bytes to be written. |
Writes array of byte data to the specified address in blocking mode.
API will wait for the write operation to be completed. It returns error or success status.
| cy_en_rram_status_t Cy_RRAM_TSWriteByteArray | ( | RRAMC_Type * | base, |
| uint32_t | addr, | ||
| const uint8_t * | data, | ||
| uint32_t | numBytes | ||
| ) |
Writes an array of byte data to the specified address in blocking mode without considering uncorrectable ECC fail error.
API will wait for the write operation to be completed. It returns error or success status. This function tries to acquire the lock. If the lock is not available, then it returns immediately with CY_RRAM_ACQUIRE_PC_LOCK_FAIL error.
| base | The pointer to the RRAMC instance. |
| addr | Address of RRAM memory. The provided address should fall under one of the NVM or OTP sub sections otherwise bad parameter error will be returned. |
| data | Pointer to the data to be written to the specified address. |
| numBytes | Number of bytes to be written. |
This API should be used only for tearing safe use cases.
| cy_en_rram_status_t Cy_RRAM_ReadByteArray | ( | RRAMC_Type * | base, |
| uint32_t | addr, | ||
| uint8_t * | data, | ||
| uint32_t | numBytes | ||
| ) |
Reads an array of byte data from the specified address.
| base | The pointer to the RRAMC instance. |
| addr | Address of RRAM memory. The provided address should fall under one of the NVM or OTP sub sections otherwise bad parameter error will be returned. |
| data | Pointer to the destination where the read data is stored. |
| numBytes | Number of bytes to be read. |
Reads an array of byte data from the specified address.
| cy_en_rram_status_t Cy_RRAM_TSReadByteArray | ( | RRAMC_Type * | base, |
| uint32_t | addr, | ||
| uint8_t * | data, | ||
| uint32_t | numBytes | ||
| ) |
Reads an array of byte data from the specified address after validating the uncorrectable ECC fail bits.
Returns ECC fail error if uncorrectable ECC fail error exist. This function tries to acquire the lock. If the lock is not available, then it returns immediately with CY_RRAM_ACQUIRE_PC_LOCK_FAIL error.
| base | The pointer to the RRAMC instance. |
| addr | Address of RRAM memory. The provided address should fall under one of the NVM or OTP sub sections otherwise bad parameter error will be returned. |
| data | Pointer to the destination where the read data is stored. |
| numBytes | Number of bytes to be read. |
Returns ECC fail error if uncorrectable ECC fail error exist. This API should be used only for tearing safe use cases.
| cy_en_rram_status_t Cy_RRAM_Init | ( | RRAMC_Type * | base, |
| cy_en_rram_vmode_t | vmode, | ||
| bool | retrvAlgoInfo | ||
| ) |
Retrieves configuration settings from configuration space in extra area.
Sequence followed: Set voltage/frequency mode cy_en_rram_vmode_t Start "Retrieve configuration settings" sequence and waits until the sequence finishes. Validate for read errors and return status.
| base | The pointer to the RRAMC instance. |
| vmode | voltage/frequency mode for operations. |
| retrvAlgoInfo | Set the parameter to true in order to retrieve the write algorithm information along with the SYSCONF information and configuration settings. |
| __STATIC_INLINE uint32_t Cy_RRAM_GetStatus | ( | RRAMC_Type * | base | ) |
Get the status of RRAM.
It includes information about busy status, sleep status, status on ECC during read operation, write protection error.
| base | The pointer to the RRAMC instance. |
| __STATIC_INLINE bool Cy_RRAM_IsBusy | ( | RRAMC_Type * | base | ) |
Indicates the status of NVM Busy flag.
| base | The pointer to the RRAMC instance. |
| __STATIC_INLINE cy_en_rram_hresp_t Cy_RRAM_GetAHBError | ( | RRAMC_Type * | base | ) |
Gets AHB bus error occurred during transactions.
| base | The pointer to the RRAMC instance. |
| __STATIC_INLINE void Cy_RRAM_EnableSleepMode | ( | RRAMC_Type * | base | ) |
Puts RRAM in Sleep mode.
No memory access is possible in NVM sleep mode. During sleep, the SFR NVM_CONF1 can be read and written, all other SFRs are read-only.
| base | The pointer to the RRAMC instance. |
| __STATIC_INLINE void Cy_RRAM_DisableSleepMode | ( | RRAMC_Type * | base | ) |
Puts RRAM in Normal mode.
| base | The pointer to the RRAMC instance. |
| __STATIC_INLINE cy_en_rram_sleep_t Cy_RRAM_GetSleepStatus | ( | RRAMC_Type * | base | ) |
Gets the sleep status of RRAM.
| base | The pointer to the RRAMC instance. |
| cy_en_rram_status_t Cy_RRAM_EnableWP | ( | RRAMC_Type * | base, |
| uint32_t | numSectors | ||
| ) |
Enables write protection for number of sectors starting with sector 0 in RRAM NVM region.
Before calling this API, user need to call Cy_RRAM_GetWPLockState() API and make sure the write protection lock is not locked. Otherwise this API will return CY_RRAM_WPLOCK_ENABLED error.
| base | The pointer to the RRAMC instance. |
| numSectors | Number of sectors. |
Before calling this API, user need to call Cy_RRAM_GetWPLockState() API and make sure the write protection lock is not locked. Otherwise this API will return CY_RRAM_WPLOCK_ENABLED error.
| cy_en_rram_status_t Cy_RRAM_DisableWP | ( | RRAMC_Type * | base | ) |
Disables write protection for all sectors in RRAM NVM region.
Before calling this API, user need to call Cy_RRAM_GetWPLockState() API and make sure the write protection lock is not locked. Otherwise this API will return CY_RRAM_WPLOCK_ENABLED error.
| base | The pointer to the RRAMC instance. |
Before calling this API, user need to call Cy_RRAM_GetWPLockState() API and make sure the write protection lock is not locked. Otherwise this API will return CY_RRAM_WPLOCK_ENABLED error.
| __STATIC_INLINE void Cy_RRAM_SetWPLock | ( | RRAMC_Type * | base | ) |
Enables the write protection lock by setting WPLCK to 1.
Once locked, the lock state cannot be changed till next reset.
| base | The pointer to the RRAMC instance. |
| __STATIC_INLINE cy_en_rram_wp_lock_t Cy_RRAM_GetWPLockState | ( | RRAMC_Type * | base | ) |
Gets the state of write protection lock.
| base | The pointer to the RRAMC instance. |
| __STATIC_INLINE void Cy_RRAM_SetVoltageMode | ( | RRAMC_Type * | base, |
| cy_en_rram_vmode_t | vmode | ||
| ) |
Set voltage/frequency mode.
| base | The pointer to the RRAMC instance. |
| vmode | Voltage mode. Refer cy_en_rram_vmode_t |
| __STATIC_INLINE cy_en_rram_vmode_t Cy_RRAM_GetVoltageMode | ( | RRAMC_Type * | base | ) |
Get voltage/frequency mode.
| base | The pointer to the RRAMC instance. |
| __STATIC_INLINE void Cy_RRAM_SetTemperature | ( | RRAMC_Type * | base, |
| cy_en_rram_temperature_t | temperature | ||
| ) |
Set junction temperature.
| base | The pointer to the RRAMC instance. |
| temperature | Temperature. Refer cy_en_rram_temperature_t |
| __STATIC_INLINE cy_en_rram_temperature_t Cy_RRAM_GetTemperature | ( | RRAMC_Type * | base | ) |
Get junction temperature.
| base | The pointer to the RRAMC instance. |
| cy_en_rram_status_t Cy_RRAM_SetProtLockableRegion | ( | RRAMC_Type * | base, |
| uint32_t | regionSize | ||
| ) |
Sets the size of lockable region in PROTECTED_NVM region.
If size is larger than PROTECTED_NVM, the entire PROTECTED_NVM is lockable. The lockable region can be configured only if the protected nvm lock state is unlocked. The configured region is protected only when the protected nvm lock state is locked
| base | The pointer to the RRAMC instance. |
| regionSize | Size of lockable region in KB. The valid range is 1-256. |
If size is larger than PROTECTED_NVM, the entire PROTECTED_NVM is lockable. The lockable region can be configured only if the protected nvm lock state is unlocked. The configured region is protected only when the protected nvm lock state is locked
| __STATIC_INLINE uint32_t Cy_RRAM_GetProtLockableRegion | ( | RRAMC_Type * | base | ) |
Gets the size of configured lockable region in PROTECTED_NVM region.
| base | The pointer to the RRAMC instance. |
| __STATIC_INLINE void Cy_RRAM_SetProtLock | ( | RRAMC_Type * | base | ) |
Enables the lock for the configured PROTECTED_NVM region Cy_RRAM_SetProtLockableRegion().
Updating the configured region and lockable programming are NOT allowed. The topmost 1KB of lockable region which is always writable regardless of lock status. Once locked, the lock state cannot be changed till next reset.
| base | The pointer to the RRAMC instance. |
| __STATIC_INLINE cy_en_rram_protected_lock_t Cy_RRAM_GetProtLockState | ( | RRAMC_Type * | base | ) |
Get the lock state of the PROTECTED_NVM Lockable region.
| base | The pointer to the RRAMC instance. |
| __STATIC_INLINE void Cy_RRAM_SetUDSLock | ( | RRAMC_Type * | base | ) |
Enables the lock to avoid access to UDS key.
Once locked, the lock state cannot be changed till next reset.
| base | The pointer to the RRAMC instance. |
| __STATIC_INLINE cy_en_rram_uds_lock_t Cy_RRAM_GetUDSLockState | ( | RRAMC_Type * | base | ) |
Get the status of UDS lock.
If it is locked then there will be no access to UDS key. Until the lock is unlocked. The lock state cannot be changed till next reset.
| base | The pointer to the RRAMC instance. |
| __STATIC_INLINE void Cy_RRAM_SetUDSConfig | ( | RRAMC_Type * | base, |
| bool | config | ||
| ) |
Configure UDS to trigger a AHB error or read as zero without error when there is a read access to UDS.
It is effective only when UDS is locked.
| base | The pointer to the RRAMC instance. |
| config | Set to true to trigger AHB error when there is a read access to UDS. Set to false to return read as zero for the read access without any AHB error. |
| __STATIC_INLINE void Cy_RRAM_ForceRelPCLock | ( | RRAMC_Type * | base | ) |
Release PC lock forcefully.
In order to avoid deadlock situation during indirect write operation, CM0 has the capability to release or break the acquired lock. Should be called only when a pc lock acquired by CM33/CM55 during indirect write operation needs be released forcefully. This API can be called before the start of write operation from CM0. This API is only available for CM0 secure enclave.