4.16. SPI

4.16.1. About This Document

Document Title

Userguide of MCAL SPI Driver

Document Version

Version 1.3

Company

Texas Instruments

Document Name

SPI User Guide

4.16.2. Document Revision History

Version

Date

Revision History

Status

Version 1.0

04 Nov 2020

Initial Version

Approved

Version 1.1

27 Feb 2023

Revised version with Interrupt and Dma mode for qSpi

Approved

Version 1.2

30 Mar 2023

Revised version with Interrupt and Dma mode for qSpi

Approved

Version 1.3

15 Sep 2023

Updated Configuration parameters

Approved

4.16.3. Table of contents

  1. Acronyms and Definitions

  2. Functional Overview

  3. Deviations to requirements(Requirement Traceability)

  4. Integration Details

  5. API Description

  6. Configuration Description

  7. Memory Mapping

  8. Memory footprint

  9. Performance

  10. Example Usage

  11. FAQ’s

  12. Test Report(Link to test report)

  13. References

  14. TI Disclaimer

4.16.4. Acronyms and Definitions

Acronyms and Definitions used are presented in below table.

Acronyms

Descriptions

BSW

Basic Software

DET

Default Error Tracer

SPI

Serial Peripheral Interface

MCU

Micro Controller Unit

OS

Operating System

API

Application Programming Interface

HW

Hardware

SW

Software

4.16.5. Functional Overview

4.16.5.1. Brief Overview

This document describes MCAL SPI Driver functionality, its application interfaces and configuration details as per AUTOSAR version 4.3.1 .

Supported AUTOSAR Release

4.3.1

Supported Configuration Variants

Pre-Compile,Link Time and Post-build

Vendor ID

SPI_VENDOR_ID (44)

Module ID

SPI_MODULE_ID (83)

Supported Platform

Am273x

The SPI driver provides services for basic communication with external components. These components can be used by an application.

The main tasks of the SPI are:

  1. Handle data transmission to the components connected via SPI

  2. Take care of the settings required by external components (baud rate etc.)

4.16.5.1.1. SPI Driver Architecture

The following figure shows where the SPI is located in the AUTOSAR architecture

../_images/spi_image5.png

Figure 1: SPI in AUTOSAR architecture.

The next figure shows the interfaces to adjacent modules of the SPI. These interfaces are described in further chapters.

../_images/spi_image3.png

Figure 2: SPI Interfaces.

4.16.5.1.2. Initialization

The SPI driver is initialized by calling Spi_Init(), with parameter ConfigPtr referencing a runtime configuration set. Spi_DeInit() will deninitialize the driver.

4.16.5.1.3. States

There are 3 states in which the SPI driver can be in.

  1. SPI_UNINIT: The SPI Handler/Driver is not initialized or not usable.

  2. SPI_IDLE : The SPI Handler/Driver is not currently transmitting any Job.

  3. SPI_BUSY : The SPI Handler/Driver is performing a SPI Job (transmit).

4.16.5.2. Features Supported and Not Supported

SPI IP Features supported

Autosar Features Supported

Not Supported

  1. Configure SPI with

    • External devices

    • Channels

    • Jobs

    • Sequences

  2. Configure physical units and callback functions

  3. Configure implementation features like:

    • SPI scalability level(s).

    • SPI channel buffers

    • SPI Interrupts

    • SPI frame transfers with up to 32 bit clock frames

  4. Interruptible Sequences

  5. Synchronous mode for both MibSPI and QSPI HW unit

  6. Asynchronous mode for MibSPI HW unit.

  7. Supports Multi-buffered and compatibility mode.

  1. Spi Initilaizes the all features required for Transmiision and reception.

  2. Spi Supports the Using of interna buffers for transfeer and receiving of data

  3. Spi supports asynchronous transmission and reception

  4. Spi supports synchronous transmission and reception.

  5. Spi supports setting of external Buffers.

  6. Spi Supports the Getting the status of

    • Hwunit

    • Job Result

    • Sequence result

  7. Spi Supports setting mode of the Communication

  8. Spi Supports cancel of sequence

Non-standard API supported and tested

  1. Spi_RegisterReadback

  2. Spi_SetLoopbackMode

Standard APIs not supported

  1. Spi_WriteIB

  2. Spi_ReadIB

4.16.5.3. Assumptions

None

4.16.5.4. Limitations

  1. A job queued in a sequence cannot be queued via another sequence. This is a design limitation to reduce driver complexity.

  2. A channel in a job in a sequence cannot be part of another active job or sequence. This is a design limitation to reduce driver complexity.

  3. If a sequence is started, another high priority job belonging to another sequence cannot interrupt the job belonging to the same hardware unit. But the job can be scheduled ahead of another pending job of the started sequence if it belongs to another HW queue.

4.16.5.6. File Structure

Description of static files is provided below:

Static source and header files

Description

Spi.h

Contains the API’s of the SPI driver to be used by upper layers.

Spi.c

Contains the implementation of the API’s for SPI driver.

Spi_Irq.c and Spi_Irq.h

Contains ISR function definitions

Spi_Priv.c,Spi_Priv.h,Spi_Utils.c, Spi_Utils.h,Spi_Mibspi.c,Spi_Mibspi.h Spi_Qspi.c and Spi_Qspi.h

Contains Internal functions definition of SPI driver.

Spi_Dbg.h

Contains Internal functions definition of SPI driver.

Description of generated files is provided below:

Plugin Files

Descriptions

Spi_Cfg.h

Contains the Precompile switches, Symbloic names of Group, channels and hardware units Configured maximum number Groups and hardware units

Spi_PBCfg.c

Contains all channels Post-Build Configured parameters

Spi_Cfg.c

Contains all channels Pre-compile Configured parameters

Spi_Lcfg.c

Contains all channels Link-Time Configured parameters

../_images/spi_image4.png

Figure 4: SPI header file include structure

4.16.6. Deviations to requirements(Requirement Traceability)

4.16.6.1. Module Requirements

Will be updated in future release

4.16.6.2. Deviation of requirements against AUTOSAR specification requirements

Will be updated in future release

4.16.7. Integration Details

4.16.7.1. Dependency on Other Software Modules

4.16.7.1.1. MCU

The module MCU powers up the microcontroller’s peripherals at startup time and initializes the PLL and the internal clock domains which go to the SPI unit. The SPI module also supports an internal divider which can be changed at configuration time using the ‘clkDivider’ member of Spi_McSPIExternalDeviceConfigType structure to configure the actual SPI functional clock.

4.16.7.1.2. PORT

The module PORT enables the SPI lines at startup time. To operate the SPI properly, the PORT driver must be configured. The PORT driver sets the PINs to the required mux values for the SPI to operate.

4.16.7.1.3. OSEK / AUTOSAR OS (Optional)

An operating system can be used for task scheduling, interrupt handling, global suspend and restore of interrupts and creating of the Interrupt Vector Table. The SPI module may use OSEK/AUTOSAR OS to suspend and restore global interrupts.

4.16.7.2. Error Handling module

4.16.7.2.1. DET

The module SPI depends on the DET (by default) in order to report development errors.

Detection and reporting of development errors can be enabled or disabled by the parameter SpiDevErrorDetect (The macro SPI_DEV_ERROR_DETECT = STD_ON generated in file Spi_Cfg.h).

The DET can be replaced optionally by an equivalent component which is responsible to recognize development errors, if no DET component is available.

The DET error is reported with Module ID.

The reported service IDs identify the services which are described earlier.

The following table represents the service IDs:

Service ID

Service

SPI_SID_INIT = 0x00

Spi_Init

SPI_SID_DEINIT = 0x01

Spi_DeInit

SPI_SID_WRITEIB = 0x02

Spi_WriteIB

SPI_SID_ASYNCTRANSMIT = 0x03

Spi_AsyncTransmit

SPI_SID_READIB = 0x04

Spi_ReadIB

SPI_SID_SETUPEB = 0x05

Spi_SetupEB

SPI_SID_GETSTATUS = 0x06

Spi_GetStatus

SPI_SID_GETJOBRESULT = 0x07

Spi_GetJobResult

SPI_SID_GETSEQUENCERESULT = 0x08

Spi_GetSequenceResult

SPI_SID_GETVERSIONINFO = 0x09

Spi_GetVersionInfo

SPI_SID_SYNCTRANSMIT = 0x0A

Spi_SyncTransmit

SPI_SID_GETHWUNITSTATUS = 0x0B

Spi_GetHwUnitStatus

SPI_SID_CANCEL = 0x0C

Spi_Cancel

SPI_SID_SETASYNCMODE = 0x0D

Spi_SetAsyncMode

SPI_SID_MAINFUNCTION_HANDLING = 0x10

Spi_MainfunctionHandling

The errors reported to DET module are described in the following table:

Error Code

Error Macro

Description

[0x0A]

SPI_E_PARAM_CHANNEL

channel out of bounds, exceeds the maximum number of configured channels

[0x0B]

SPI_E_PARAM_JOB

Job out of bounds, exceedsthe maximum number of configured jobs

[0x0C]

SPI_E_PARAM_SEQ

Sequence out of bounds, exceedsthe maximum number of configured sequences

[0x0D]

SPI_E_PARAM_LENGTH

Length out of bounds, exceeds the maximum number of configured EB- or IB- buffer length

[0x0E]

SPI_E_PARAM_UNIT

The requested hardware unit does not exist

[0x10]

SPI_E_PARAM_POINTER

An invalid configuration has been passed (i.e., a NULL_PTR). This is an extension to AUTOSAR.

[0x1A]

SPI_E_UNINIT

A service was requested, but the driver has not been initialized

[0x2A]

SPI_E_SEQ_PENDING

The requested sequence isstill pending

[0x3A]

SPI_E_SEQ_IN_PROCESS

Transmission of synchronous sequence in progress (not supported)

[0x4A]

SPI_E_ALREADY_INITIALIZED

The driver is already initialized.

AUTOSAR requires to check the validity of function parameters. These checks are for development error reporting and can be en/dis-abled separately. En/dis-abling of single checks is an addition to the AUTOSAR standard which requires to en/dis-able the complete parameter checking via the parameter SPI_DEV_ERROR_DETECT. The following table shows which parameter checks are performed on which services:

Check Services

SPI_E_PARAM_CHANNEL

SPI_E_PARAM_JOB

SPI_E_PARAM_SEQ

SPI_E_PARAM_LENGTH

SPI_E_PARAM_UNIT

SPI_E_PARAM__POINTER

SPI_E_PARAM_UNINIT

SPI_E_SEQ_PENDING

SPI_E_SEQ_PROCESS

SPI_E_ALREADY_INITILAIZE

Spi_Init

x

x

x

x

x

Spi_DeInit

x

Spi_AsyncTransmit

x

x

x

Spi_SetupEB

x

x

x

x

Spi_GetStatus

Spi_GetJobResult

x

x

Spi_GetSequenceResult

x

x

Spi_GetVersionInfo

x

Spi_GetHwUnitStatus

x

x

Spi_Cancel

x

x

4.16.7.2.2. DEM

By default, production code related errors are reported to the DEM using the service DEM_ReportErrorStatus ().

The errors reported to DEM are described in the following table

Error Code

Error Macro

Description

Assigned by DEM

SPI_E_HARDWARE_ERROR

This error is raised when McSPI RX FIFO overflows.

Assigned by DEM

SPI_E_BIT_ERROR

A bit error was detected.

Assigned by DEM

SPI_E_DESYNC_ERROR

Slave desynchronized.

Assigned by DEM

SPI_E_DLEN_ERROR

Data length mismatch detected during transmission.

Assigned by DEM

SPI_E_TXSTALL_ERROR

This error occurs if the driver tries to write data which has not been transmitted yet.

Assigned by DEM

SPI_E_RXSTALL_ERROR

The driver tries to read data, but no data has been provided by the hardware.

Assigned by DEM

SPI_E_DOVR_ERROR

The hardware reported an internal receive buffer overrun

Assigned by DEM

SPI_E_TO_ERROR

The hardware reported a Timeout error because of non-activation of ENA pin

4.16.7.3. Callback Functions

The SPI driver does not provide any call back functions.

4.16.7.4. Callback Notification

Notifications:

At its configurable interfaces, the SPI defines notifications that can be mapped to callback functions provided by other modules. The mapping is not statically defined by the SPI but can be performed at configuration time. The function prototypes that can be used for the configuration have to match the appropriate function prototype signatures, which are described in the following.

Example:Spi_JobEndNotification

4.16.7.5. Hardware - Software - ISR API name mapping

For interrupt notification, ISR’s are provided in SPI driver. There are Two ISR for each SPI hardware unit. Depending on hardware unit configured, it will call group notify function. The interrupt service routines shall be mapped to the interrupt sources of the respective cross bar interrupt. The supported ISR’s are part of the Spi_Irq.h file.

Following are SPI module ISR for each hardware unit:

  1. SPI HW UNIT 0

    • Spi_IrqUnit0TxRxERR()

    • ISR(Spi_IrqUnit0TxRxERR)

    • Spi_IrqUnit0TxRx()

    • ISR(Spi_IrqUnit0TxRx)

    • RCSS_Spi_IrqUnit0TxRxERR()

    • ISR(RCSS_Spi_IrqUnit0TxRxERR)

    • RCSS_Spi_IrqUnit0TxRx()

    • ISR(RCSS_Spi_IrqUnit0TxRx)

  2. SPI HW UNIT 1

    • Spi_IrqUnit1TxRxERR()

    • ISR(Spi_IrqUnit1TxRxERR)

    • Spi_IrqUnit1TxRx()

    • ISR(Spi_IrqUnit1TxRx)

    • RCSS_Spi_IrqUnit1TxRxERR()

    • ISR(RCSS_Spi_IrqUnit1TxRxERR)

    • RCSS_Spi_IrqUnit1TxRx()

    • ISR(RCSS_Spi_IrqUnit1TxRx)

These above per-channel ISRs for different category ISRs are available as stated above. Use CDD_EDMA_lld_transferCompletionMasterIsrFxn, the common-channel DMA-based Interrupt Subroutine function for transfer completion from DMA. All these functions should be registered during interrupt configuration.

4.16.7.6. Scheduling Strategy

4.16.7.6.1. SchM (Optional)

Beside the OS the BSW Scheduler provides functions that SPI calls at begin and end of critical sections.

Example : SchM_Enter_Spi_SPI_EXCLUSIVE_AREA_0(),SchM_Exit_Spi_SPI_EXCLUSIVE_AREA_0().

4.16.7.6.2. Critical Sections

There is only one kind of critical sections in this driver. Within these sections all read /modify / write accesses to internal SPI driver data structures must be protected. Therefore switching to tasks that also access SPI has to be avoided and all SPI interrupts have to be suspended.

4.16.8. API Description

4.16.8.1. Description of the API’s(Can be referred to Api Guide spec)

Refer the AUTOSAR SWS for API documentation and Type definition.

4.16.8.2. API’s with Service ID

The following table presents the service IDs and the related services:

Autosar API’s Supported:

Service ID

Service

SPI_SID_INIT = 0x00

Spi_Init

SPI_SID_DEINIT = 0x01

Spi_DeInit

SPI_SID_WRITEIB = 0x02

Spi_WriteIB

SPI_SID_ASYNCTRANSMIT = 0x03

Spi_AsyncTransmit

SPI_SID_READIB = 0x04

Spi_ReadIB

SPI_SID_SETUPEB = 0x05

Spi_SetupEB

SPI_SID_GETSTATUS = 0x06

Spi_GetStatus

SPI_SID_GETJOBRESULT = 0x07

Spi_GetJobResult

SPI_SID_GETSEQUENCERESULT = 0x08

Spi_GetSequenceResult

SPI_SID_GETVERSIONINFO = 0x09

Spi_GetVersionInfo

SPI_SID_SYNCTRANSMIT = 0x0A

Spi_SyncTransmit

SPI_SID_GETHWUNITSTATUS = 0x0B

Spi_GetHwUnitStatus

SPI_SID_CANCEL = 0x0C

Spi_Cancel

SPI_SID_SETASYNCMODE = 0x0D

Spi_SetAsyncMode

SPI_SID_MAINFUNCTION_HANDLING = 0x10

Spi_MainfunctionHandling

Autosar API’s not Supported:

None

Refer Autosar SWS for API description mentioned in above table.

4.16.8.3. Description on Non Standard API’s

Spi_RegisterReadback API–This function is non-autosar based and is used to read the data in the registers of Spi if we keep SPI_REGISTER_READBACK_API Macro as ON.

4.16.9. Configuration Description

4.16.9.1. Configuration Variants

The SPI is configured through GUI in Post-Build ,**Pre-Compile Variant** and Link Time Variant.

Variants

Generated Files

PostBuild

Spi_PBCfg.c , Spi_Cfg.h

Pre-Compile

Spi_Cfg.c , Spi_Cfg.h

Link-Time

Spi_Lcfg.c , Spi_Cfg.h

4.16.9.2. Parameter Description

4.16.9.2.1. Standard Configuration

Standard Parameters

Description

Default Value

Range

Unit

SPI_E_HARDWARE_ERROR

Reference to configured DEM event to report "Hardware failure". If the reference is not configured the error shall not be reported.

SpiMaxChannel

This parameter contains the number of Channels configured. It will be gathered by tools during the configuration stage.

28

0..255

Integer

SpiMaxJob

Total number of Jobs configured.

14

0..65535

Integer

SpiMaxSequence

Total number of Sequences configured.

14

0..255

Integer

SpiMaxHwUnit

Maximum number of HW unit.

5

5

Integer

SpiMaxExternalDeviceConfig

Maximum number of HW unit.

5

1..5

Integer

SpiMaxDLC

Total number of MiBSPI driver instances.

0..2

Integer

SpiChannelId

SPI Channel ID, used as parameter in SPI API functions.

0

0..255

Integer

SpiChannelType

Buffer usage with EB/IB channel.

Enumeration

SpiDataWidth

This parameter is the width of a transmitted data unit.

16

1..32

Integer

SpiDefaultData

The default data to be transmitted when (for internal buffer or external buffer) the pointer passed to Spi_WriteIB (for internal buffer) or to Spi_SetupEB (for external buffer) is NULL.

0

0..4294967295

Integer

SpiEbMaxLength

This parameter contains the maximum size (number of data elements) of data buffers in case of EB Channels and only.

255

0..65535

Integer

SpiIbNBuffers

This parameter contains the maximum number of data buffers in case of IB Channels and only.

10

0..65535

Integer

SpiTransferStart

This parameter defines the first starting bit for transmission.

MSB

LSB MSB

Enumeration

SpiBaudrate

This parameter is the communication baudrate - This parameter allows

500

1.0 .. 4.0E7

Float

SpiCsIdentifier

This parameter is the symbolic name to identify the Chip Select (CS) allocated to this Job (CS0 to CS3).

CS0

String

SpiCsPolarity

This parameter defines the active polarity of Chip Select.

HIGH

LOW HIGH

Boolean

SpiCsSelection

When the Chip select handling is enabled (see SpiEnableCs), then this parameter specifies if the chip select is handled automatically by Peripheral HW engine or via general purpose IO by Spi driver.

CS_VIA_PERIPHERAL_ENGINE

CS_VIA_GPIO CS_VIA_PERIPHERAL_ENGINE

Enumeration

SpiDataShiftEdge

This parameter defines the SPI data shift edge.

LEADING

LEADING TRAILING

Enumeration

SpiEnableCs

This parameter enables or not the Chip Select handling functions. If this parameter is enabled then parameter SpiCsSelection further details the type of chip selection.

TRUE

TRUE FALSE

Boolean

SpiHwUnit

This parameter is the symbolic name to identify the HW SPI Hardware

MIBSPI1

MIBSPI1 MIBSPI2 QSPI1 RCSS_MIBSPI1 RCSS_MIBSPI2

Enumeration

SpiShiftClockIdleLevel

This parameter defines the SPI shift clock idle level.

LOW

LOW HIGH

Boolean

SpiTimeClk2Cs

Timing between clock and chip select (in seconds) - This parameter allows to use a range of values from 0 up to 0.0001 seconds.

1.00E-05

0.0 .. 0.00001

Float

SpiHwUnitSynchronous

the SpiJob uses its containing SpiDriver in a synchronous manner. If it is set to "ASYNCHRONOUS", it uses the driver in an asynchronous way. If the parameter is not set, the SpiChannel uses the driver also in an asynchronous way.

ASYNCHRONOUS

ASYNCHRONOUS SYNCHRONOUS

Enumeration

SpiJobEndNotification

This parameter is a reference to a notification function.

NULL_PTR

Function

SpiJobId

SPI Job ID, used as parameter in SPI API functions.

0..65535

Integer

SpiJobPriority

Priority set accordingly to SPI093: 0, lowest, 3, highest priority

3

0..3

Integer

SpiDeviceAssignment

Reference to the external device used by this job

SpiChannelIndex

This parameter specifies the order of Channels within the Job.

0..255

Integer

SpiChannelAssignment

A job reference to a SPI channel.

SpiInterruptibleSequence

This parameter allows or not this Sequence to be suspended by another one.

TRUE

TRUE FALSE

Boolean

SpiSeqEndNotification

This parameter is a reference to a notification function.

NULL_PTR

Function

SpiSequenceId

SPI Sequence ID, used as parameter in SPI API functions.

0..255

Integer

SpiJobAssignment

A sequence references several jobs, which are executed during a communication sequence

SpiCancelApi

Switches the Spi_Cancel function ON or OFF.

TRUE

TRUE FALSE

Boolean

SpiChannelBuffersAllowed

Selects the SPI Handler/Driver Channel Buffers usage allowed

0..2

Integer

SpiDevErrorDetect

Switches the Development Error Detection and Notification ON or OFF.

TRUE

TRUE FALSE

Boolean

SpiHwStatusApi

Switches the Spi_GetHWUnitStatus function ON or OFF.

TRUE

TRUE FALSE

Boolean

SpiInterruptibleSeqAllowed

Switches the Interruptible Sequences handling functionality ON or OFF.

TRUE

TRUE FALSE

Boolean

SpiLevelDelivered

Selects the SPI Handler/Driver level of scalable functionality: SYNC ONLY(0), ASYNC ONLY (1), SYNC/ASYNC(2)

2

0..2

Integer

SpiMainFunctionPeriod

This parameter defines the cycle time of the function Spi_MainFunction_Handling in seconds.

0.01

1.0E-7 .. 0.1

Float

SpiSupportConcurrentSyncTransmit

Specifies whether concurrent Spi_SyncTransmit() calls for different sequences shall be configurable.

FALSE

TRUE FALSE

Boolean

SpiUserCallbackHeaderFile

Header file name which will be included by the Spi. The value of this parameter shall be used as h-char-sequence or q-char-sequence according to ISO C90 section 6.10.2 "source file inclusion".

FALSE

TRUE FALSE

Boolean

SpiVersionInfoApi

Switches the Spi_GetVersionInfo function ON or OFF.

TRUE

TRUE FALSE

Boolean

SpiMaxHwUnit

Number of different SPI hardware microcontroller peripherals (units/busses) available and handled by this SPI Handler/Driver module.

5

1..5

Integer

4.16.9.2.2. IP Specific Configuration

Standard Parameters

Description

Default Value

Range

Unit

SPI_E_BIT_ERROR

Reference to the DemEventParameter which shall be issued when a bit error is detected. If the reference is not configured the error shall not be reported.

SPI_E_TXSTALL_ERROR

Reference to the DemEventParameter which shall be issued when driver tries to write data which has not been transmitted yet. If the reference is not configured the error shall not be reported.

SPI_E_RXSTALL_ERROR

Reference to the DemEventParameter which shall be issued when driver tries to read data, but no data has been provided by the hardware. If the reference is not configured the error shall not be reported

SPI_E_DOVR_ERROR

Reference to the DemEventParameter which shall be issued when hardware reported an internal receive buffer overrun. If the reference is not configured the error shall not be reported.

SPI_E_TO_ERROR

Reference to the DemEventParameter which shall be issued when a timeout error is detected. If the reference is not configured the error shall not be reported

0

SpiMaxHwUnit

Maximum number of HW unit

5

1..5

Integer

SpiMaxExternalDeviceConfig

Maximum number of HW unit.

5

1..5

Integer

SpiMaxDLC

Total number of MiBSPI driver instances.

0..2

Integer

SpiClockFrequency

operating frequency of Spi, derived from MCU VCLK

200

Float

SpiQspiChannelMode

Channel Mode when doing QSPI xfer connected to serial flash interface.

SPI_QSPI_SFI_CHMODE_DATA

SPI_QSPI_SFI_CHMODE_CMD SPI_QSPI_SFI_CHMODE_ADDR SPI_QSPI_SFI_CHMODE_DATA

Enumeration

SpiQspiTransferCommand

SPI Chconfig QSPI serial flash channel direction.Not applicable to MiBSPI

SPI_QSPI_SFI_CH_XFER_CMD_4PIN_WR_SINGLE

SPI_QSPI_SFI_CH_XFER_CMD_RESERVED_0 SPI_QSPI_SFI_CH_XFER_CMD_4PIN_RD_SINGLE SPI_QSPI_SFI_CH_XFER_CMD_4PIN_WR_SINGLE SPI_QSPI_SFI_CH_XFER_CMD_4PIN_RD_DUAL SPI_QSPI_SFI_CH_XFER_CMD_RESERVED_1 SPI_QSPI_SFI_CH_XFER_CMD_3PIN_RD_SINGLE SPI_QSPI_SFI_CH_XFER_CMD_3PIN_WR_SINGLE SPI_QSPI_SFI_CH_XFER_CMD_6PIN_RD_QUAD

Enumeration

SpiTimeCs2Clk

Chip-select-active-to-transmit-start-delay. See SpiTimeClk2Cs.

1.00E-05

0..1.00E-04

Float

SpiCsMode

This selcts which CS mode the device should enter. SPI_SINGLE: the CS will return to default level after one transmission unit has been sent. SPI_CONTINUOUS: the CS will remain active during the whole transmission.

SPI_CONTINUOUS

Enumeration

SpiCsIdleTime

CS idle time (Timing between clock and chip select) if single mode is chosen.

SPI_DATADELAY_0

SPI_DATADELAY_0 SPI_DATADELAY_1 SPI_DATADELAY_2 SPI_DATADELAY_3

Enumeration

SpiExtDeviceClockDivider

Clock divider. This is used to derive the required baudrate from the QSPI functional clock.

0

0..65535

SpiExtenalDeviceConfigQSPI

QSPI HW specific external device config. Should be populated only if hwUnitId is of type QSPI

0

SpiExtDeviceQspiClockMode

Mode 0 = {0=CPOL,0=CPHA}; Mode 1={0,1}; Mode 2={1,0} Mode 3={1,1}

SPI_CLK_MODE_0

SPI_CLK_MODE_0 SPI_CLK_MODE_1 SPI_CLK_MODE_2 SPI_CLK_MODE_3

Enumeration

SpiExtDeviceQspiMemsetupConfig

Contains the read/write command setup for the memory mapped protocol

SpiExtDeviceQspiMemsetupReadCmd

Read Command.

19

0..255

Integer

SpiExtDeviceQspiMemsetupWriteCmd

Write Command

18

0..255

Integer

SpiExtDeviceQspiMemsetupNumDummyBits

Number of dummy bits to use if numDummyBytes = 0x0

0

0..31

Integer

SpiExtDeviceQspiMemsetupReadType

Determines if the read command is a single/dual/quad read mode cmd

SPI_QSPI_MEMSETUP_READTYPE_NORMAL_0

SPI_QSPI_MEMSETUP_READTYPE_NORMAL_0 SPI_QSPI_MEMSETUP_READTYPE_DUAL SPI_QSPI_MEMSETUP_READTYPE_NORMAL_1 SPI_QSPI_MEMSETUP_READTYPE_QUAD

Enumeration

SpiExtDeviceQspiMemsetupNumAddrBytesType

Number of address bytes to be sent

SPI_QSPI_MEMSETUP_NUMADDR_BYTES_4

SPI_QSPI_MEMSETUP_NUMADDR_BYTES_1 SPI_QSPI_MEMSETUP_NUMADDR_BYTES_2 SPI_QSPI_MEMSETUP_NUMADDR_BYTES_3 SPI_QSPI_MEMSETUP_NUMADDR_BYTES_4

Enumeration

SpiExtDeviceQspiMemsetupNumDummyBytesType

Number of address bytes to be sent

SPI_QSPI_MEMSETUP_NUMDUMMY_BYTES_0

SPI_QSPI_MEMSETUP_NUMDUMMY_BYTES_0 SPI_QSPI_MEMSETUP_NUMDUMMY_BYTES_1 SPI_QSPI_MEMSETUP_NUMDUMMY_BYTES_2 SPI_QSPI_MEMSETUP_NUMDUMMY_BYTES_3

Enumeration

SpiExtDeviceMIBSPITxRxMode

TX and RX mode .RX only mode doesn’t make sense In master mode because to receive data the master has to generate clock, which means it should transmit. Hence this mode is not supported. The user can alternatively set the TX buffer pointer to NULL and set the default TX value (defaultTxData) to make TX data line at the desired level.

SPI_TX_RX_MODE_BOTH

SPI_TX_RX_MODE_BOTH SPI_TX_RX_MODE_TX_ONLY

Enumeration

SpiQspiEnableMemmapMode

Enable memory map mode for QSPI to access serial flash as memory.Applicable only if external device is QSPI

SpiHwUnitType

SPI HW unit to use

SPI_UNIT_QSPI1 SPI_UNIT_MIBSPI1 SPI_UNIT_MIBSPI2 RCSS_SPI_UNIT_MIBSPI1 RCSS_SPI_UNIT_MIBSPI2

Enumeration

SpiUnitHasRam

If true Spi hardware unt has access to internal RAM buffers

Boolean

SpiUnitUsesDma

If true Spi hardware untt uses DMA

Boolean

SpiUnitEnable

Enable SPI instance

TRUE

TRUE FALSE

Boolean

SpiEnableJobLog

Enable/disable SPI job log

TRUE

TRUE FALSE

Boolean

SpiMaxExternalDevices

Number of different SPI hardware microcontroller peripherals (units/busses) available and handled by this SPI Handler/Driver module.

5

1..5

Integer

SpiMaxJobLogLength

Maximum job log entries when logging is ON

100

1.1024

Integer

SpiMaxChannelsPerJob

Maximum channels allowed per job

4

1..32

Integer

SpiMaxJobsPerSequence

Maximum jobs allowed per sequence

4

1..32

Integer

SpiMaxChannels

Maximum channels across all jobs/sequence/hwunit

24

1..128

Integer

SpiMaxJobs

Maximum jobs across all sequence/hwunit

10

1..128

Integer

SpiMaxSequences

Maximum sequence across all hwunit

10

1..128

Integer

SpiIrqType

Type of Isr function: void functionname(void) 1.CAT1 : interrupt void func(void) 2.CAT2 : ISR(func)

SPI_ISR_CAT2

SPI_ISR_VOID SPI_ISR_CAT1 SPI_ISR_CAT2

Enumeration

SpiNotificationHeader

Header file providing Job End and Sequence End notification functions definitions.

Integer

SpiDefaultOSCounterId

Default Os Counter Id if node reference to OsCounter ref SpiOsCounterRef is not set

0

0..16

Integer

SpiTimeoutDuration

SPI timeout - used in SPI busy wait

32000

1..4294967295

Integer

SpiRegisterReadbackApi

Specifies whether RegisterReadback API is enabled

FALSE

TRUE FALSE

Boolean

SpiSetLoopbackModeApi

Specifies whether RegisterReadback API is enabled.

SpiHwUnitEnabled

Structure for storing enabled SPI HW units

Structure

SpiHwUnitEnabledFlag

Group configurations

SPI_UNIT_MIBSPI1

SPI_UNIT_MIBSPI1 SPI_UNIT_MIBSPI2 SPI_UNIT_QSPI1 SPI_UNIT_QSPI2 RCSS_SPI_UNIT_MIBSPI1 RCSS_SPI_UNIT_MIBSPI2

Enumeration

SpiChannelBuffersType

Buffer usage with EB/IB channel

SPI_EB

SPI_EB SPI_IB

Enumeration

4.16.9.3. Symbolic Names deviations

None

4.16.9.4. Configuration rules and constraints to enable plausibility checks

Will be updated in future release

4.16.10. Memory Mapping

Memory Mapping Sections

SPI_CODE

SPI_VAR

SPI_VAR_NO_INIT

SPI_CONST

SPI_APPL_DATA

SPI_APPL_CODE

SPI_START_SEC_VAR_INIT_UNSPECIFIED (.data) SPI_STOP_SEC_VAR_INIT_UNSPECIFIED

x

SPI_START_SEC_CODE (.text) SPI_STOP_SEC_CODE

x

SPI_START_SEC_VAR_NO_INIT_UNSPECIFIED (.bss) SPI_STOP_SEC_VAR_NO_INIT_UNSPECIFIED

x

SPI_START_SEC_CONST_UNSPECIFIED (.const) SPI_STOP_SEC_CONST_UNSPECIFIED

x

SPI_START_SEC_CODE_ISR (.text) SPI_STOP_SEC_CODE_ISR

x

For application code used by SPI (like callback functions)

x

4.16.11. Memory footprint

Please refer Memory Footprint for more details.

4.16.12. Performance

4.16.12.1. Actual Performance details

Will be updated in future release

4.16.12.2. ISR latency / ISR processing time

Interrupt mode: The ISR processing time is : 1.525us

4.16.12.3. API level profiling

Will be updated in future release

4.16.13. Example Usage

4.16.13.1. Steps to build and run example

Spi example application demonstrating the MCAL SPI driver features is in folder <MCAL_ROOT>/examples/Spi.

This application can be built from the root folder by giving gmake –s mibspi_app PLATFORM=am273 for mibspi and gmake –s qspi_app PLATFORM=am273 for qspi flash app.

Once the build is completed we get a binary file, which is loaded in our controller and executed.

4.16.13.2. Document external set up Information

None

4.16.13.3. Flow of the example application

  1. In case of qspi_flash_app when you try to run, it will show different options which include reading and writing in config mode as well as Dma read is their in which read takes place without use of CPU.

  2. In case of Qspi Async Mode, we have made Async mode in our example and for that Read in memmap mode is done through DMA and write is done through Interupt mode.

  3. For Dma read user has to register the ISR configuration. So there will be two ISR configuration required: Spi_IrqUint0TxRxQspi and Spi_IrqUnit0TxRxQspiDma. For more details refer qspi_flash_app example.

  4. Our example has included Cache Api’s that are required for Dma Read. For more details please check our qspi_flash_app example.

4.16.13.4. Configuration used to test this example

The example application is configured with the following Parametrs:

Max Channels :28U

Max channels per Sequence :4U

Max Jobs per seq:4U

Max HwUnit :5U

Max External Devices:5U

Channel BufferType :SPI_EB

Maximum Buffer Length :255U

Transfer Type :SPI_MSB

4.16.13.5. Example Logs

4.16.14. MIBSPI Log :

SPI_APP: Sample Application - STARTS !!!
SPI_APP: Variant - Post Build being used !!!
SPI_APP: CH 1: JOBS 1: SEQ 1: HWUNIT 1: !!!

SPI MCAL Version Info
---------------------
Vendor ID           : 44
Module ID           : 83
SW Major Version    : 9
SW Minor Version    : 0
SW Patch Version    : 1

SPI Test Passed!!!
MibSPI Test Passed!!!

4.16.15. QSPI Log:

--------------------------------------
Select test to run as per below table:
--------------------------------------

a: QSPI Serial Flash Test - Spansion 1 bit/Quick

b: QSPI Serial Flash Test - Spansion 4 bit/Quick

c: QSPI Serial Flash Test - Spansion 4 bit/Extended

d: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Write

e: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Read

f: QSPI Serial Flash Test - Spansion 4 bit/Extended

g: Auto Run

x: EXIT

Enter Test to Run (Use UART1 console):

Option entered = g
Running test : 0: QSPI Serial Flash Test - Spansion 1 bit/Quick

QSPIFlashLib_setCfg : 28
QSPIFlashLib_getFlashCmdJobCfg cmd : 5 ch:28 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 60 ch:26 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 9f ch:25 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 3 ch:22 datawidth 32
QSPIFlashLib_getFlashCmdJobCfg cmd : 20 ch:19 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 2 ch:17 datawidth 32
QSPIFlashLib_getFlashCmdJobCfg cmd : 6 ch:14 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 35 ch:13 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 31 ch:11 datawidth 8
QSPI_FLASH_APP: CH 19: JOBS 9: SEQ 9: HWUNIT 1: LOOP COUNT 1:!!!
Total Expected Time for Transmission (without mem compare): 0ms!!

SPI MCAL Version Info
---------------------
Vendor ID           : 44
Module ID           : 83
SW Major Version    : 8
SW Minor Version    : 6
SW Patch Version    : 2


MID - c8
                DID - 40
                                        Erasing QSPI Flash Block

Erase Complete

Writing test pattern to flash..

Write flash Completed

Reading the flash data..

Data Read Write Test Passed.

Quick Flash Test Complete.
SPI Test Passed!!!

--------------------------------------
Select test to run as per below table:
--------------------------------------

a: QSPI Serial Flash Test - Spansion 1 bit/Quick

b: QSPI Serial Flash Test - Spansion 4 bit/Quick

c: QSPI Serial Flash Test - Spansion 4 bit/Extended

d: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Write

e: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Read

f: QSPI Serial Flash Test - Spansion 4 bit/Extended

g: Auto Run

x: EXIT

Enter Test to Run (Use UART1 console):

Running test : 1: QSPI Serial Flash Test - Spansion 4 bit/Quick

QSPIFlashLib_setCfg : 28
QSPIFlashLib_getFlashCmdJobCfg cmd : 5 ch:28 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 60 ch:26 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 9f ch:25 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 6b ch:22 datawidth 32
QSPIFlashLib_getFlashCmdJobCfg cmd : 20 ch:18 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 2 ch:16 datawidth 32
QSPIFlashLib_getFlashCmdJobCfg cmd : 6 ch:13 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 35 ch:12 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 31 ch:10 datawidth 8
QSPI_FLASH_APP: CH 20: JOBS 9: SEQ 9: HWUNIT 1: LOOP COUNT 1:!!!
Total Expected Time for Transmission (without mem compare): 0ms!!

SPI MCAL Version Info
---------------------
Vendor ID           : 44
Module ID           : 83
SW Major Version    : 8
SW Minor Version    : 6
SW Patch Version    : 2


MID - c8
                DID - 40
                                        Erasing QSPI Flash Block

Erase Complete

Writing test pattern to flash..

Write flash Completed

Reading the flash data..

Data Read Write Test Passed.

Quick Flash Test Complete.
SPI Test Passed!!!

--------------------------------------
Select test to run as per below table:
--------------------------------------

a: QSPI Serial Flash Test - Spansion 1 bit/Quick

b: QSPI Serial Flash Test - Spansion 4 bit/Quick

c: QSPI Serial Flash Test - Spansion 4 bit/Extended

d: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Write

e: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Read

f: QSPI Serial Flash Test - Spansion 4 bit/Extended

g: Auto Run

x: EXIT

Enter Test to Run (Use UART1 console):

Running test : 2: QSPI Serial Flash Test - Spansion 4 bit/Extended

QSPIFlashLib_setCfg : 28
QSPIFlashLib_getFlashCmdJobCfg cmd : 5 ch:28 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 60 ch:26 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 9f ch:25 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 6b ch:22 datawidth 32
QSPIFlashLib_getFlashCmdJobCfg cmd : 20 ch:18 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 2 ch:16 datawidth 32
QSPIFlashLib_getFlashCmdJobCfg cmd : 6 ch:13 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 35 ch:12 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 31 ch:10 datawidth 8
QSPI_FLASH_APP: CH 20: JOBS 9: SEQ 9: HWUNIT 1: LOOP COUNT 1:!!!
Total Expected Time for Transmission (without mem compare): 0ms!!

SPI MCAL Version Info
---------------------
Vendor ID           : 44
Module ID           : 83
SW Major Version    : 8
SW Minor Version    : 6
SW Patch Version    : 2


MID - c8
                DID - 40
                                        Erasing entire QSPI Flash..This takes 50U-60U seconds

Erase Completed

Testing Completed till block no: 20

Testing Completed till block no: 40

Testing Completed till block no: 60

Testing Completed till block no: 80

Testing Completed till block no: 100

Testing Completed till block no: 120

Testing Completed till block no: 140

Testing Completed till block no: 160

Testing Completed till block no: 180

Testing Completed till block no: 200

Testing Completed till block no: 220

Testing Completed till block no: 240

Testing Completed till block no: 260

Testing Completed till block no: 280

Testing Completed till block no: 300

Testing Completed till block no: 320

Testing Completed till block no: 340

Testing Completed till block no: 360

Testing Completed till block no: 380

Testing Completed till block no: 400

Testing Completed till block no: 420

Testing Completed till block no: 440

Testing Completed till block no: 460

Testing Completed till block no: 480

Testing Completed till block no: 500

Testing Completed till block no: 520

Testing Completed till block no: 540

Testing Completed till block no: 560

Testing Completed till block no: 580

Testing Completed till block no: 600

Testing Completed till block no: 620

Testing Completed till block no: 640

Testing Completed till block no: 660

Testing Completed till block no: 680

Testing Completed till block no: 700

Testing Completed till block no: 720

Testing Completed till block no: 740

Testing Completed till block no: 760

Testing Completed till block no: 780

Testing Completed till block no: 800

Testing Completed till block no: 820

Testing Completed till block no: 840

Testing Completed till block no: 860

Testing Completed till block no: 880

Testing Completed till block no: 900

Testing Completed till block no: 920

Testing Completed till block no: 940

Testing Completed till block no: 960

Testing Completed till block no: 980

Testing Completed till block no: 1000

Testing Completed till block no: 1020

Entire Flash Test Complete
SPI Test Passed!!!

--------------------------------------
Select test to run as per below table:
--------------------------------------

a: QSPI Serial Flash Test - Spansion 1 bit/Quick

b: QSPI Serial Flash Test - Spansion 4 bit/Quick

c: QSPI Serial Flash Test - Spansion 4 bit/Extended

d: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Write

e: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Read

f: QSPI Serial Flash Test - Spansion 4 bit/Extended

g: Auto Run

x: EXIT

Enter Test to Run (Use UART1 console):

Running test : 3: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Write

QSPIFlashLib_setCfg : 28
QSPIFlashLib_getFlashCmdJobCfg cmd : 5 ch:28 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 60 ch:26 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 9f ch:25 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 6b ch:22 datawidth 32
QSPIFlashLib_getFlashCmdJobCfg cmd : 20 ch:18 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 2 ch:16 datawidth 32
QSPIFlashLib_getFlashCmdJobCfg cmd : 6 ch:13 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 35 ch:12 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 31 ch:10 datawidth 8
QSPI_FLASH_APP: CH 20: JOBS 9: SEQ 9: HWUNIT 1: LOOP COUNT 1:!!!
Total Expected Time for Transmission (without mem compare): 0ms!!

SPI MCAL Version Info
---------------------
Vendor ID           : 44
Module ID           : 83
SW Major Version    : 8
SW Minor Version    : 6
SW Patch Version    : 2


MID - c8
                DID - 40
                                        Erasing entire QSPI Flash..This takes 50U-60U seconds

Erase Completed

Entire Flash Test Complete
SPI Test Passed!!!

--------------------------------------
Select test to run as per below table:
--------------------------------------

a: QSPI Serial Flash Test - Spansion 1 bit/Quick

b: QSPI Serial Flash Test - Spansion 4 bit/Quick

c: QSPI Serial Flash Test - Spansion 4 bit/Extended

d: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Write

e: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Read

f: QSPI Serial Flash Test - Spansion 4 bit/Extended

g: Auto Run

x: EXIT

Enter Test to Run (Use UART1 console):

Running test : 4: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Read

QSPIFlashLib_setCfg : 28
QSPIFlashLib_getFlashCmdJobCfg cmd : 5 ch:28 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 60 ch:26 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 9f ch:25 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 6b ch:22 datawidth 32
QSPIFlashLib_getFlashCmdJobCfg cmd : 20 ch:18 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 2 ch:16 datawidth 32
QSPIFlashLib_getFlashCmdJobCfg cmd : 6 ch:13 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 35 ch:12 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 31 ch:10 datawidth 8
QSPI_FLASH_APP: CH 20: JOBS 9: SEQ 9: HWUNIT 1: LOOP COUNT 1:!!!
Total Expected Time for Transmission (without mem compare): 0ms!!

SPI MCAL Version Info
---------------------
Vendor ID           : 44
Module ID           : 83
SW Major Version    : 8
SW Minor Version    : 6
SW Patch Version    : 2


MID - c8
                DID - 40
                                        Testing Completed till block no: 20

Testing Completed till block no: 40

Testing Completed till block no: 60

Testing Completed till block no: 80

Testing Completed till block no: 100

Testing Completed till block no: 120

Testing Completed till block no: 140

Testing Completed till block no: 160

Testing Completed till block no: 180

Testing Completed till block no: 200

Testing Completed till block no: 220

Testing Completed till block no: 240

Testing Completed till block no: 260

Testing Completed till block no: 280

Testing Completed till block no: 300

Testing Completed till block no: 320

Testing Completed till block no: 340

Testing Completed till block no: 360

Testing Completed till block no: 380

Testing Completed till block no: 400

Testing Completed till block no: 420

Testing Completed till block no: 440

Testing Completed till block no: 460

Testing Completed till block no: 480

Testing Completed till block no: 500

Testing Completed till block no: 520

Testing Completed till block no: 540

Testing Completed till block no: 560

Testing Completed till block no: 580

Testing Completed till block no: 600

Testing Completed till block no: 620

Testing Completed till block no: 640

Testing Completed till block no: 660

Testing Completed till block no: 680

Testing Completed till block no: 700

Testing Completed till block no: 720

Testing Completed till block no: 740

Testing Completed till block no: 760

Testing Completed till block no: 780

Testing Completed till block no: 800

Testing Completed till block no: 820

Testing Completed till block no: 840

Testing Completed till block no: 860

Testing Completed till block no: 880

Testing Completed till block no: 900

Testing Completed till block no: 920

Testing Completed till block no: 940

Testing Completed till block no: 960

Testing Completed till block no: 980

Testing Completed till block no: 1000

Testing Completed till block no: 1020

Entire Flash Test Complete
SPI Test Passed!!!

--------------------------------------
Select test to run as per below table:
--------------------------------------

a: QSPI Serial Flash Test - Spansion 1 bit/Quick

b: QSPI Serial Flash Test - Spansion 4 bit/Quick

c: QSPI Serial Flash Test - Spansion 4 bit/Extended

d: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Write

e: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Read

f: QSPI Serial Flash Test - Spansion 4 bit/Extended

g: Auto Run

x: EXIT

Enter Test to Run (Use UART1 console):

Running test : 5: QSPI Serial Flash Test - Spansion 4 bit/Extended

QSPIFlashLib_setCfg : 28
QSPIFlashLib_getFlashCmdJobCfg cmd : 5 ch:28 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 60 ch:26 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 9f ch:25 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 6b ch:22 datawidth 32
QSPIFlashLib_getFlashCmdJobCfg cmd : 20 ch:18 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 2 ch:16 datawidth 32
QSPIFlashLib_getFlashCmdJobCfg cmd : 6 ch:13 datawidth 0
QSPIFlashLib_getFlashCmdJobCfg cmd : 35 ch:12 datawidth 8
QSPIFlashLib_getFlashCmdJobCfg cmd : 31 ch:10 datawidth 8
QSPI_FLASH_APP: CH 20: JOBS 9: SEQ 9: HWUNIT 1: LOOP COUNT 1:!!!
Total Expected Time for Transmission (without mem compare): 0ms!!

SPI MCAL Version Info
---------------------
Vendor ID           : 44
Module ID           : 83
SW Major Version    : 8
SW Minor Version    : 6
SW Patch Version    : 2


MID - c8
                DID - 40
                                        Erasing entire QSPI Flash..This takes 50U-60U seconds

Erase Completed

Testing Completed till block no: 20

Testing Completed till block no: 40

Testing Completed till block no: 60

Testing Completed till block no: 80

Testing Completed till block no: 100

Testing Completed till block no: 120

Testing Completed till block no: 140

Testing Completed till block no: 160

Testing Completed till block no: 180

Testing Completed till block no: 200

Testing Completed till block no: 220

Testing Completed till block no: 240

Testing Completed till block no: 260

Testing Completed till block no: 280

Testing Completed till block no: 300

Testing Completed till block no: 320

Testing Completed till block no: 340

Testing Completed till block no: 360

Testing Completed till block no: 380

Testing Completed till block no: 400

Testing Completed till block no: 420

Testing Completed till block no: 440

Testing Completed till block no: 460

Testing Completed till block no: 480

Testing Completed till block no: 500

Testing Completed till block no: 520

Testing Completed till block no: 540

Testing Completed till block no: 560

Testing Completed till block no: 580

Testing Completed till block no: 600

Testing Completed till block no: 620

Testing Completed till block no: 640

Testing Completed till block no: 660

Testing Completed till block no: 680

Testing Completed till block no: 700

Testing Completed till block no: 720

Testing Completed till block no: 740

Testing Completed till block no: 760

Testing Completed till block no: 780

Testing Completed till block no: 800

Testing Completed till block no: 820

Testing Completed till block no: 840

Testing Completed till block no: 860

Testing Completed till block no: 880

Testing Completed till block no: 900

Testing Completed till block no: 920

Testing Completed till block no: 940

Testing Completed till block no: 960

Testing Completed till block no: 980

Testing Completed till block no: 1000

Testing Completed till block no: 1020

Entire Flash Test Complete
SPI Test Passed!!!

--------------------------------------
Select test to run as per below table:
--------------------------------------

a: QSPI Serial Flash Test - Spansion 1 bit/Quick

b: QSPI Serial Flash Test - Spansion 4 bit/Quick

c: QSPI Serial Flash Test - Spansion 4 bit/Extended

d: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Write

e: QSPI Serial Flash Test - MemMap Spansion 4 bit/Extended Read

f: QSPI Serial Flash Test - Spansion 4 bit/Extended

g: Auto Run

x: EXIT

Enter Test to Run (Use UART1 console):
QSPI Test Passed!!!

4.16.16. FAQ’s

None

4.16.18. References

AUTOSAR SWS 4.3.1 will be updated in future release.

Technical Reference Manual

4.16.19. TI Disclaimer

Texas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or to discontinue any product or service without notice, and advise customers to obtain the latest version of relevant information to verify, before placing orders, that information being relied on is current and complete. All products are sold subject to the terms and conditions of sale supplied at the time of order acknowledgment, including those pertaining to warranty, patent infringement, and limitation of liability.

TI warrants performance of its products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are utilized to the extent TI deems necessary to support this warranty. Specific testing of all parameters of each device is not necessarily performed, except those mandated by government requirements.

Customers are responsible for their applications using TI components. In order to minimize risks associated with the customer’s applications, adequate design and operating safeguards must be provided by the customer to minimize inherent or procedural hazards.

TI assumes no liability for applications assistance or customer product design. TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or other intellectual property right of TI covering or relating to any combination, machine, or process in which such products or services might be or are used. TI’s publication of information regarding any third party’s products or services does not constitute TI’s approval, license, warranty or endorsement thereof.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations and notices. Representation or reproduction o f this information with alteration voids all warranties provided for an associated TI product or service, is an unfair and deceptive business practice, and TI is not responsible nor liable for any such use.

Resale of TI’s products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service, is an unfair and deceptive business practice, and TI is not responsible nor liable for any such use.

Also see: Standard Terms and Conditions of Sale for Semiconductor Products https://www.ti.com/sc/docs/stdterms.htm

Mailing Address: Texas Instruments Post Office Box 655303 Dallas, Texas 75265