CLEON  Version 1
Cloud-Offloaded GPS Receiver
hal_dma.c File Reference

DMA configuration. More...

#include "cleon_conf.h"
#include "app_define.h"
#include "sys_define.h"
#include "hal_define.h"
#include "fs_define.h"
Include dependency graph for hal_dma.c:

Go to the source code of this file.

Functions

void HAL_DMA_Init (void)
 Initializing DMA.
 
__interrupt void DMA_VECTOR_ISR (void)
 

Variables

cleon_header_u uniCLEONHeader
 
cleon_gps_data_u uniCLEONGPSData
 
cleon_sensor_data_u uniCLEONSensorData
 
bool bFLAG_DMATransferCompleted = _CLEAR_
 

Detailed Description

DMA configuration.

Definition in file hal_dma.c.

Function Documentation

__interrupt void DMA_VECTOR_ISR ( void  )

Definition at line 69 of file hal_dma.c.

{
switch(__even_in_range(DMAIV,16))
{
case 0: break;
case 2:
break;
case 4: break;
case 6: break;
case 8: break;
case 10: break;
case 12: break;
case 14: break;
case 16: break;
default: break;
}
}
void HAL_DMA_Init ( void  )

Initializing DMA.

Returns
void
Parameters
void

Definition at line 29 of file hal_dma.c.

{
// External DMA trigger is mapped to P2.1
// Port mapping for P2.1
PMAPKEYID = PMAPKEY;
// P2.1 is mapped to external DMA trigger
P2MAP1 = 0x02;
// Set external input as DMA trigger
DMACTL0 = DMA0TSEL_31;
// Read-modify-write disable
DMACTL4 = DMARMWDIS;
DMA0CTL &= ~DMAIFG;
// DMA destination address will be incremental while DMA source address won't be changed
DMA0CTL = DMADSTINCR_3;
// Enabling DMA transfer till the size of 'SIZE_OF_GPS_DATA_CHUNK_IN_WORDS' reached
// Set DMA source address to base address of P5IN (0x0240)
// Because P5IN and P6IN are adjuscent registers with 1 byte offset,
// P5IN and P6IN will be transferred at a time if accessed with length of word (16 bit)
__data16_write_addr((unsigned short) &DMA0SA,(unsigned long) 0x0240);
// DMA destination address setting : address of 'GPSData' structure
__data16_write_addr((unsigned short) &DMA0DA,(unsigned long) &uniCLEONGPSData);
// Enabling DMA interrupt
DMA0CTL |= DMAIE;
}

Here is the caller graph for this function:

Variable Documentation

bool bFLAG_DMATransferCompleted = _CLEAR_

Definition at line 19 of file hal_dma.c.

cleon_gps_data_u uniCLEONGPSData

Definition at line 14 of file sys_init.c.

cleon_header_u uniCLEONHeader

Definition at line 13 of file sys_init.c.

cleon_sensor_data_u uniCLEONSensorData

Definition at line 15 of file sys_init.c.