This file contains definitions for the Hardware Abstraction Layer (HAL) specifically created for the MSP430.
More...
#include <stdint.h>
#include "hal_macros.h"
Go to the source code of this file.
Defines |
|
#define | XT1LFOFFG 0 |
|
#define | XT1HFOFFG 0 |
|
#define | XT2OFFG 0 |
|
#define | XTS 0 |
|
#define | XT2DRIVE_3 0 |
|
#define | SELECT_FLLREF(source) st(UCSCTL3 = (UCSCTL3 & ~(SELREF_7)) | (source);) |
|
#define | SELECT_ACLK(source) st(UCSCTL4 = (UCSCTL4 & ~(SELA_7)) | (source);) |
|
#define | SELECT_MCLK(source) st(UCSCTL4 = (UCSCTL4 & ~(SELM_7)) | (source);) |
|
#define | SELECT_SMCLK(source) st(UCSCTL4 = (UCSCTL4 & ~(SELS_7)) | (source);) |
|
#define | SELECT_MCLK_SMCLK(sources) st(UCSCTL4 = (UCSCTL4 & ~(SELM_7 + SELS_7)) | (sources);) |
|
#define | ACLK_DIV(x) st(UCSCTL5 = (UCSCTL5 & ~(DIVA_7)) | (DIVA__##x);) |
|
#define | MCLK_DIV(x) st(UCSCTL5 = (UCSCTL5 & ~(DIVM_7)) | (DIVM__##x);) |
|
#define | SMCLK_DIV(x) st(UCSCTL5 = (UCSCTL5 & ~(DIVS_7)) | (DIVS__##x);) |
|
#define | SELECT_FLLREFDIV(x) st(UCSCTL3 = (UCSCTL3 & ~(FLLREFDIV_7))|(FLLREFDIV__##x);) |
|
#define | UCS_STATUS_OK 0 |
|
#define | UCS_STATUS_ERROR 1 |
Functions |
| void | LFXT_Start (uint16_t xtdrive) |
| uint16_t | LFXT_Start_Timeout (uint16_t xtdrive, uint16_t timeout) |
| void | XT1_Start (uint16_t xtdrive) |
| uint16_t | XT1_Start_Timeout (uint16_t xtdrive, uint16_t timeout) |
| void | XT1_Bypass (void) |
| void | XT2_Start (uint16_t xtdrive) |
| uint16_t | XT2_Start_Timeout (uint16_t xtdrive, uint16_t timeout) |
| void | XT2_Bypass (void) |
| void | Init_FLL_Settle (uint16_t fsystem, uint16_t ratio) |
Detailed Description
This file contains definitions for the Hardware Abstraction Layer (HAL) specifically created for the MSP430.
- Author:
- Texas Instruments, Inc
- Date:
- November 2010
- Version:
- 1.0 Initial version
- Note:
- Built with IAR for MSP430 Version: 5.10
Definition in file hal_UCS.h.
Function Documentation
| void Init_FLL_Settle |
( |
uint16_t |
fsystem, |
|
|
uint16_t |
ratio | |
|
) |
| | |
Initializes FLL of the UCS and wait till settled
- Parameters:
-
| fsystem | required system frequency (MCLK) in kHz |
| ratio | ratio between fsystem and FLLREFCLK |
Initializes FLL of the UCS and wait till settled
- Parameters:
-
| fsystem | required system frequency (MCLK) in kHz |
| ratio | ratio between MCLK and FLLREFCLK |
Definition at line 237 of file hal_UCS.c.
| void LFXT_Start |
( |
uint16_t |
xtdrive |
) |
|
Startup routine for 32kHz Cristal on LFXT1
- Parameters:
-
| xtdrive,: | Bits defining the LFXT drive mode after startup |
Startup routine for 32kHz Cristal on LFXT1
Definition at line 92 of file hal_UCS.c.
| uint16_t LFXT_Start_Timeout |
( |
uint16_t |
xtdrive, |
|
|
uint16_t |
timeout | |
|
) |
| | |
Startup routine for 32kHz Cristal on LFXT1 with timeout counter
- Parameters:
-
| xtdrive,: | Bits defining the LFXT drive mode after startup |
| timeout,: | value for the timeout counter |
Startup routine for 32kHz Cristal on LFXT1 with timeout counter
Definition at line 108 of file hal_UCS.c.
Use XT1 in Bypasss mode
Definition at line 165 of file hal_UCS.c.
| void XT1_Start |
( |
uint16_t |
xtdrive |
) |
|
Startup routine for XT1
- Parameters:
-
| xtdrive,: | Bits defining the XT drive mode |
Startup routine for XT1
Definition at line 129 of file hal_UCS.c.
| uint16_t XT1_Start_Timeout |
( |
uint16_t |
xtdrive, |
|
|
uint16_t |
timeout | |
|
) |
| | |
Startup routine for XT1 with timeout counter
- Parameters:
-
| xtdrive,: | Bits defining the XT drive mode |
| timeout,: | value for the timeout counter |
Startup routine for XT1 with timeout counter
Definition at line 145 of file hal_UCS.c.
Use XT2 in Bypasss mode for MCLK
Use XT2 in Bypasss mode
Definition at line 218 of file hal_UCS.c.
| void XT2_Start |
( |
uint16_t |
xtdrive |
) |
|
Startup routine for XT2
- Parameters:
-
| xtdrive,: | Bits defining the XT drive mode |
Startup routine for XT2
Definition at line 180 of file hal_UCS.c.
| uint16_t XT2_Start_Timeout |
( |
uint16_t |
xtdrive, |
|
|
uint16_t |
timeout | |
|
) |
| | |
Startup routine for XT2 with timeout counter
- Parameters:
-
| xtdrive,: | Bits defining the XT drive mode |
| timeout,: | value for the timeout counter |
Startup routine for XT2 with timeout counter
Definition at line 197 of file hal_UCS.c.