AM263Px MCU+ SDK: Generic Phy layer API.

| AM263Px MCU+ SDK 26.00.00 |

Functions
Generic Phy layer API.
APIs for SOC Specific Device Drivers » APIs for OSPI LLD

## Introduction

These APIs try are used for the phy tuning

## Functions
int32_t | OSPI_lld_phyTuneDDR (OSPILLD_Handle handle, uint32_t flashOffset)
| This function tunes the OSPI PHY for DDR mode to set optimal PHY parameters. More...
int32_t | OSPI_lld_phyTuneSDR (OSPILLD_Handle handle, uint32_t flashOffset)
| This function tunes the OSPI PHY for SDR mode to set optimal PHY parameters. More...
int32_t | OSPI_lld_phyTuneGrapher (OSPILLD_Handle handle, uint32_t flashOffset, uint8_t arrays[5][128][128])
| This function takes a 4x128x128 array and fills it with TX RX DLL data for graphing purpose. More...
void | OSPI_lld_phyGetTuningData (uint32_t *tuningData, uint32_t *tuningDataSize)
| This function returns the address to the attack vector buf required for tuning the PHY. More...
int32_t | OSPI_lld_phyReadAttackVector (OSPILLD_Handle handle, uint32_t offset)
| This function checks if the attack vector, or the data used for tuning the PHY is present at an offset in the flash. More...
int32_t | OSPI_lld_enablePhy (OSPILLD_Handle handle)
| This function enables the PHY. More...
int32_t | OSPI_lld_disablePhy (OSPILLD_Handle handle)
| This function disables the PHY. More...
int32_t | OSPI_lld_enablePhyPipeline (OSPILLD_Handle handle)
| This function enables the PHY Pipeline. More...
int32_t | OSPI_lld_disablePhyPipeline (OSPILLD_Handle handle)
| This function disables the PHY Pipeline. More...

## Function Documentation

## ◆ OSPI_lld_phyTuneDDR()

int32_t OSPI_lld_phyTuneDDR | ( | OSPILLD_Handle | handle,
|  | uint32_t | flashOffset
| ) |  |

This function tunes the OSPI PHY for DDR mode to set optimal PHY parameters.

Precondition
  OSPI controller has been opened using OSPI_open()

Parameters

  handle | An OSPILLD_Handle returned from an OSPI_open()
  flashOffset | Offset of the flash at which the PHY tuning data is present

Returns
  OSPI_SYSTEM_SUCCESS on success, OSPI_SYSTEM_FAILURE otherwise

## ◆ OSPI_lld_phyTuneSDR()

int32_t OSPI_lld_phyTuneSDR | ( | OSPILLD_Handle | handle,
|  | uint32_t | flashOffset
| ) |  |

This function tunes the OSPI PHY for SDR mode to set optimal PHY parameters.

Precondition
  OSPI controller has been opened using OSPI_open()

Parameters

  handle | An OSPILLD_Handle returned from an OSPI_open()
  flashOffset | Offset of the flash at which the PHY tuning data is present

Returns
  OSPI_SYSTEM_SUCCESS on success, OSPI_SYSTEM_FAILURE otherwise

## ◆ OSPI_lld_phyTuneGrapher()

int32_t OSPI_lld_phyTuneGrapher | ( | OSPILLD_Handle | handle,
|  | uint32_t | flashOffset,
|  | uint8_t | arrays[5][128][128]
| ) |  |

This function takes a 4x128x128 array and fills it with TX RX DLL data for graphing purpose.

Precondition
  OSPI controller has been opened using OSPI_open()

Parameters

  handle | An OSPILLD_Handle returned from an OSPI_open()
  flashOffset | Offset of the flash at which the PHY tuning data is present
  arrays | A 4x128x128 array. In this, the tx rx dll data for 4 different read delay values will be stored. This can be later used for graphing

Returns
  OSPI_SYSTEM_SUCCESS on success, OSPI_SYSTEM_FAILURE otherwise

## ◆ OSPI_lld_phyGetTuningData()

void OSPI_lld_phyGetTuningData | ( | uint32_t * | tuningData,
|  | uint32_t * | tuningDataSize
| ) |  |

This function returns the address to the attack vector buf required for tuning the PHY.

Parameters

  tuningData | Address of the tuningData array
  tuningDataSize | Size of the tuningData array

## ◆ OSPI_lld_phyReadAttackVector()

int32_t OSPI_lld_phyReadAttackVector | ( | OSPILLD_Handle | handle,
|  | uint32_t | offset
| ) |  |

This function checks if the attack vector, or the data used for tuning the PHY is present at an offset in the flash.

Parameters

  handle | An OSPILLD_Handle returned from an OSPI_open()
  offset | Offset in flash to check for tuningData

Returns
  OSPI_SYSTEM_SUCCESS on success, OSPI_SYSTEM_FAILURE otherwise

## ◆ OSPI_lld_enablePhy()

int32_t OSPI_lld_enablePhy | ( | OSPILLD_Handle | handle | ) |

This function enables the PHY.

Precondition
  OSPI controller has been opened using OSPI_open()

Parameters

  handle | An OSPILLD_Handle returned from an OSPI_open()

Returns
  OSPI_SYSTEM_SUCCESS on success, OSPI_SYSTEM_FAILURE otherwise

## ◆ OSPI_lld_disablePhy()

int32_t OSPI_lld_disablePhy | ( | OSPILLD_Handle | handle | ) |

This function disables the PHY.

Precondition
  OSPI controller has been opened using OSPI_open()

Parameters

  handle | An OSPILLD_Handle returned from an OSPI_open()

Returns
  OSPI_SYSTEM_SUCCESS on success, OSPI_SYSTEM_FAILURE otherwise

## ◆ OSPI_lld_enablePhyPipeline()

int32_t OSPI_lld_enablePhyPipeline | ( | OSPILLD_Handle | handle | ) |

This function enables the PHY Pipeline.

Precondition
  OSPI controller has been opened using OSPI_open()

Parameters

  handle | An OSPILLD_Handle returned from an OSPI_open()

Returns
  OSPI_SYSTEM_SUCCESS on success, OSPI_SYSTEM_FAILURE otherwise

## ◆ OSPI_lld_disablePhyPipeline()

int32_t OSPI_lld_disablePhyPipeline | ( | OSPILLD_Handle | handle | ) |

This function disables the PHY Pipeline.

Precondition
  OSPI controller has been opened using OSPI_open()

Parameters

  handle | An OSPILLD_Handle returned from an OSPI_open()

Returns
  OSPI_SYSTEM_SUCCESS on success, OSPI_SYSTEM_FAILURE otherwise