![]() |
MAX32655 Peripheral Driver API
Peripheral Driver API for the MAX32655
|
Modules | |
| RTC_Registers | |
Enumerations | |
| enum | mxc_rtc_freq_sel_t |
| enum | mxc_rtc_int_en_t |
| enum | mxc_rtc_int_fl_t |
Functions | |
| int | MXC_RTC_SetTimeofdayAlarm (uint32_t ras) |
| int | MXC_RTC_SetSubsecondAlarm (uint32_t rssa) |
| int | MXC_RTC_Start (void) |
| int | MXC_RTC_Stop (void) |
| int | MXC_RTC_Init (uint32_t sec, uint16_t ssec) |
| int | MXC_RTC_SquareWaveStart (mxc_rtc_freq_sel_t fq) |
| int | MXC_RTC_SquareWaveStop (void) |
| int | MXC_RTC_Trim (int8_t trm) |
| int | MXC_RTC_EnableInt (uint32_t mask) |
| int | MXC_RTC_DisableInt (uint32_t mask) |
| int | MXC_RTC_GetFlags (void) |
| int | MXC_RTC_ClearFlags (int flags) |
| int | MXC_RTC_GetSubSecond (void) |
| int | MXC_RTC_GetSubSeconds (uint32_t *ssec) |
| int | MXC_RTC_GetSecond (void) |
| int | MXC_RTC_GetSeconds (uint32_t *sec) |
| int | MXC_RTC_GetTime (uint32_t *sec, uint32_t *subsec) |
| int | MXC_RTC_GetBusyFlag (void) |
| int | MXC_RTC_TrimCrystal (void) |
| enum mxc_rtc_freq_sel_t |
| enum mxc_rtc_int_en_t |
| enum mxc_rtc_int_fl_t |
| int MXC_RTC_ClearFlags | ( | int | flags | ) |
Clear interrupt flags.
| flags | The bitwise OR of the interrupts flags to cleear. See mxc_rtc_int_fl_t for the list of possible flags. |
| returns | Success or Fail, see MXC_ERROR_CODES |
| int MXC_RTC_DisableInt | ( | uint32_t | mask | ) |
Disable Interurpts (Blocking function)
| mask | The mask of interrupts to disable. See mxc_rtc_int_en_t for available choices. |
| returns | Success or Fail, see MXC_ERROR_CODES |
| int MXC_RTC_EnableInt | ( | uint32_t | mask | ) |
Enable Interurpts (Blocking function)
| mask | The bitwise OR of interrupts to enable. See mxc_rtc_int_en_t for available choices. |
| returns | Success or Fail, see MXC_ERROR_CODES |
| int MXC_RTC_GetBusyFlag | ( | void | ) |
Get RTC busy flag.
| returns | Success or E_BUSY, see /ref MXC_ERROR_CODES |
| int MXC_RTC_GetFlags | ( | void | ) |
Gets interrupt flags.
| The | bitwise OR of any interrupts flags that are currently set. See mxc_rtc_int_fl_t for the list of possible flags. |
| int MXC_RTC_GetSecond | ( | void | ) |
Get Second or E_BUSY, see /ref MXC_ERROR_CODES.
| returns | second value |
| int MXC_RTC_GetSeconds | ( | uint32_t * | sec | ) |
This function stores the current value of the seconds counter into a pointer if the RTC is not busy. If the RTC is busy, an error is returned.
| sec | Pointer to the variable to store the current seconds value. |
| E_NO_ERROR | if successful, otherwise an error code (see /ref MXC_ERROR_CODES). |
| int MXC_RTC_GetSubSecond | ( | void | ) |
Get SubSecond or E_BUSY, see /ref MXC_ERROR_CODES.
| Returns | subsecond value |
| int MXC_RTC_GetSubSeconds | ( | uint32_t * | ssec | ) |
This function stores the current value of the sub-seconds counter into a pointer if the RTC is not busy. If the RTC is busy, an error is returned.
| ssec | Pointer to the variable to store the current sub-seconds value. |
| E_NO_ERROR | if successful, otherwise an error code (see /ref MXC_ERROR_CODES). |
| int MXC_RTC_GetTime | ( | uint32_t * | sec, |
| uint32_t * | subsec | ||
| ) |
Get the current second and sub-second counts.
| sec | pointer to store seconds value |
| subsec | pointer to store subseconds value |
| returns | Success or Fail, see /ref MXC_ERROR_CODES |
| int MXC_RTC_Init | ( | uint32_t | sec, |
| uint16_t | ssec | ||
| ) |
Initialize the sec and ssec registers and enable RTC (Blocking function)
| sec | set the RTC Sec counter (32-bit) |
| ssec | set the RTC Sub-second counter (12-bit) |
| returns | Success or Fail, see MXC_ERROR_CODES |
| int MXC_RTC_SetSubsecondAlarm | ( | uint32_t | rssa | ) |
Set Sub-Second alarm value and enable interrupt,.
this is to be called after the init_rtc() function
| rssa | 32-bit value 0-0xFFFFFFFF |
| returns | Success or Fail, see MXC_ERROR_CODES |
| int MXC_RTC_SetTimeofdayAlarm | ( | uint32_t | ras | ) |
Set Time-of-Day alarm value and enable Interrupt.
| ras | 20-bit value 0-0xFFFFF |
| returns | Success or Fail, see MXC_ERROR_CODES |
| int MXC_RTC_SquareWaveStart | ( | mxc_rtc_freq_sel_t | fq | ) |
Allow generation of Square Wave on the SQW pin (Blocking function)
| fq | Frequency output selection |
| returns | Success or Fail, see MXC_ERROR_CODES |
| int MXC_RTC_SquareWaveStop | ( | void | ) |
Stop the generation of square wave (Blocking function)
| returns | Success or Fail, see MXC_ERROR_CODES |
| int MXC_RTC_Start | ( | void | ) |
Start the Real Time Clock (Blocking function)
| returns | Success or Fail, see MXC_ERROR_CODES |
| int MXC_RTC_Stop | ( | void | ) |
Stop the Real Time Clock (Blocking function)
| returns | Success or Fail, see MXC_ERROR_CODES |
| int MXC_RTC_Trim | ( | int8_t | trm | ) |
Set Trim register value (Blocking function)
| trm | set the RTC Trim (8-bit, +/- 127) |
| returns | Success or Fail, see MXC_ERROR_CODES |
| int MXC_RTC_TrimCrystal | ( | void | ) |
Use the 32 MHz crystal to trim the 32 kHz crystal.
Assumes that RTC interrupts are disabled and 32 MHz crystal is enabled and selected as the system clock.
| returns | trimmed value of 32 kHz crystal or error, see /ref MXC_ERROR_CODES |