Data Structures | Typedefs | Functions
UDMAMSP432E4.h File Reference

Detailed Description

uDMA driver implementation for MSP432E4.

============================================================================

This driver is intended for use only by drivers that use the uDMA peripheral (e.g., SPI). This driver is mainly used for management of the control table base address of the UDMA peripheral, and to create the DMA error Hwi.

The application should only define the memory for the control table and set up the UDMAMSP432E4_HWAttrs and UDMAMSP432E4_Config structures.

The UDMAMSP432E4 header file should be included in an application as follows:


#include <stdbool.h>
#include <stdint.h>
#include <ti/drivers/dpl/HwiP.h>
Include dependency graph for UDMAMSP432E4.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  UDMAMSP432E4_HWAttrs
 UDMAMSP432E4 Hardware attributes. More...
 
struct  UDMAMSP432E4_Config
 UDMAMSP432E4 Global configuration. More...
 
struct  UDMAMSP432E4_Object
 UDMAMSP432E4 object. More...
 

Typedefs

typedef void(* UDMAMSP432E4_ErrorFxn) (uintptr_t arg)
 UDMA error function pointer. More...
 
typedef struct UDMAMSP432E4_HWAttrs UDMAMSP432E4_HWAttrs
 UDMAMSP432E4 Hardware attributes. More...
 
typedef struct UDMAMSP432E4_Config UDMAMSP432E4_Config
 UDMAMSP432E4 Global configuration. More...
 
typedef struct UDMAMSP432E4_ConfigUDMAMSP432E4_Handle
 A handle that is returned from a UDMAMSP432E4_open() call. More...
 
typedef struct UDMAMSP432E4_Object UDMAMSP432E4_Object
 UDMAMSP432E4 object. More...
 

Functions

void UDMAMSP432E4_close (UDMAMSP432E4_Handle handle)
 Function to close the DMA driver. More...
 
void UDMAMSP432E4_init ()
 Function to initialize the MSP432E4 DMA driver. More...
 
UDMAMSP432E4_Handle UDMAMSP432E4_open ()
 Function to initialize the MSP432E4 DMA peripheral. More...
 

Typedef Documentation

§ UDMAMSP432E4_ErrorFxn

typedef void(* UDMAMSP432E4_ErrorFxn) (uintptr_t arg)

UDMA error function pointer.

§ UDMAMSP432E4_HWAttrs

UDMAMSP432E4 Hardware attributes.

This structure contains the base address of the uDMA control table, and uDMA error interrupt attributes.

The control table is used by the uDMA controller to store channel control structures. The control table can be located anywhere in system memory, but must be contiguous and aligned on a 1024-byte boundary.

dmaErrorFxn is the uDMA peripheral's error interrupt handler.

intPriority is priority of the uDMA peripheral's error interrupt, as defined by the underlying OS. It is passed unmodified to the underlying OS's interrupt handler creation code, so you need to refer to the OS documentation for usage. If the driver uses the ti.dpl interface instead of making OS calls directly, then the HwiP port handles the interrupt priority in an OS specific way. In the case of the SYS/BIOS port, intPriority is passed unmodified to Hwi_create().

A sample structure is shown below:

#include <ti/devices/msp432p4xx/driverlib/udma.h>
static tDMAControlTable dmaControlTable[64] __attribute__ ((aligned (1024)));
//
// ======== dmaErrorFxn ========
// This is the handler for the uDMA error interrupt.
//
static void dmaErrorFxn(uintptr_t arg)
{
int status = uDMAErrorStatusGet();
uDMAErrorStatusClear();
// Suppress unused variable warning
(void)status;
while (1);
}
UDMAMSP432E4_Object udmaMSP432E4Object;
const UDMAMSP432E4_HWAttrs udmaMSP432E4HWAttrs = {
.controlBaseAddr = (void *)dmaControlTable,
.dmaErrorFxn = dmaErrorFxn,
.intNum = INT_UDMAERR,
.intPriority = (~0)
};

§ UDMAMSP432E4_Config

UDMAMSP432E4 Global configuration.

The UDMAMSP432E4_Config structure contains pointers used by the UDMAMSP432E4 driver.

This structure needs to be defined before calling UDMAMSP432E4_init() and it must not be changed thereafter.

§ UDMAMSP432E4_Handle

A handle that is returned from a UDMAMSP432E4_open() call.

§ UDMAMSP432E4_Object

UDMAMSP432E4 object.

The application must not access any member variables of this structure!

Function Documentation

§ UDMAMSP432E4_close()

void UDMAMSP432E4_close ( UDMAMSP432E4_Handle  handle)

Function to close the DMA driver.

Close a DMA handle returned from UDMAMSP432E4_open().

Precondition
UDMAMSP432E4_open() has to be called first. Calling context: Task
Parameters
handleA UDMAMSP432E4_Handle returned from UDMAMSP432E4_open()
Returns
none
See also
UDMAMSP432E4_open

§ UDMAMSP432E4_init()

void UDMAMSP432E4_init ( )

Function to initialize the MSP432E4 DMA driver.

The function should be called prior to opening the DMA driver.

Returns
none
See also
UDMAMSP432E4_open()

§ UDMAMSP432E4_open()

UDMAMSP432E4_Handle UDMAMSP432E4_open ( )

Function to initialize the MSP432E4 DMA peripheral.

UDMAMSP432E4_open() can be called multiple times. *

Precondition
UDMAMSP432E4_init() has to be called first. Calling context: Task
Returns
UDMAMSP432E4_Handle on success or NULL if an error has occurred.
See also
UDMAMSP432E4_close()
© Copyright 1995-2018, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale