PSP Porting


The Platform Support Package (PSP) is designed to hold all platform-specific functionality, either because it relies on specific features of a target system, or because this provides the most efficient or flexible solution for the developer.

The module makes use of the following standard PSP function:

Function Package Component Description
psp_memcmp() psp_base psp_string Compares two blocks of memory.

The module makes use of the following standard PSP macros:

Macro Package Element Description
PSP_RD_BE32 psp_base psp_endianness Reads a 32 bit value stored as big-endian from a memory location.
PSP_WR_BE32 psp_base psp_endianness Writes a 32 bit value to be stored as big-endian to a memory location.

The module makes use of the following standard PSP SPI functions. These are described in the HCC SPI Driver PSP User Guide.

Function

Package

Element

Description

psp_spi_init() psp_base psp_spi Initializes the SPI port.
psp_spi_cs_hi() psp_base psp_spi Sets chip select high.
psp_spi_cs_lo() psp_base psp_spi Sets chip select low.
psp_spi_set_baudrate() psp_base psp_spi Sets the baud rate.
psp_spi_rx() psp_base psp_spi Receives a number of bytes.
psp_spi_tx() psp_base psp_spi Transmits a number of bytes.
psp_spi_tx1() psp_base psp_spi Transmits one byte.
psp_spi_lock() psp_base psp_spi Locks the SPI for the specific unit. This can be useful if multiple units are attached to the same SPI bus.
psp_spi_unlock() psp_base psp_spi Unlocks the SPI for the specific unit. This can be useful if multiple units are attached to the same SPI bus.

The files psp_safe_nand_mt29fxg01_spi.c and psp_safe_nand_mt29fxg01_spi.h define the psp_safe_nand_mt29fxg01_spi_init() function that configures the hardware. Modify these files as required for your hardware.