| BlueNRG-1 Peripherals drivers Examples

- Main Page
- Modules
- Classes
- Files

Macros | Functions
RTC Clockwatch
BlueNRG1 Standard Peripheral Examples » RTC_Examples

## Macros

#define | SET_HOUR 23 /*< Set hour to the RTC */
#define | SET_MINUTE 59 /*< Set minute to the RTC */
#define | SET_SECOND 31 /*< Set second to the RTC */
#define | SET_WEEKDAY 7 /*< Set weekday to the RTC */
#define | SET_DAY 1 /*< Set day to the RTC */
#define | SET_MONTH 12 /*< Set month to the RTC */
#define | SET_YEAR 2014 /*< Set year to the RTC */
#define | MATCH_HOUR 00 /*< Match hour to generate interrupt */
#define | MATCH_MINUTE 00 /*< Match minute to generate interrupt */
#define | MATCH_SECOND 01 /*< Match second to generate interrupt */
#define | MATCH_WEEKDAY 01 /*< Match weekday to generate interrupt */
#define | MATCH_DAY 02 /*< Match day to generate interrupt */
#define | MATCH_MONTH 12 /*< Match month to generate interrupt */
#define | MATCH_YEAR 2014 /*< Match year to generate interrupt */
#define | RTC_PERIOD_500ms ((32768-1)/2)

## Functions

void | RTC_Timer_Configuration (void)
| RTC Configuration. More...
void | RTC_Clockwatch_Configuration (void)
| RTC clockwatch configuration. More...
int | main (void)
| Main program code. More...

## Detailed Description

## Macro Definition Documentation

#define MATCH_DAY 02 /*< Match day to generate interrupt */

Definition at line 198 of file RTC_Clockwatch_main.c.

#define MATCH_HOUR 00 /*< Match hour to generate interrupt */

Definition at line 194 of file RTC_Clockwatch_main.c.

#define MATCH_MINUTE 00 /*< Match minute to generate interrupt */

Definition at line 195 of file RTC_Clockwatch_main.c.

#define MATCH_MONTH 12 /*< Match month to generate interrupt */

Definition at line 199 of file RTC_Clockwatch_main.c.

#define MATCH_SECOND 01 /*< Match second to generate interrupt */

Definition at line 196 of file RTC_Clockwatch_main.c.

#define MATCH_WEEKDAY 01 /*< Match weekday to generate interrupt */

Definition at line 197 of file RTC_Clockwatch_main.c.

#define MATCH_YEAR 2014 /*< Match year to generate interrupt */

Definition at line 200 of file RTC_Clockwatch_main.c.

#define RTC_PERIOD_500ms ((32768-1)/2)

Definition at line 203 of file RTC_Clockwatch_main.c.

#define SET_DAY 1 /*< Set day to the RTC */

Definition at line 189 of file RTC_Clockwatch_main.c.

#define SET_HOUR 23 /*< Set hour to the RTC */

Date and time set to: 1st of December 2014, 23 hour 59 min and 31 seconds

Definition at line 185 of file RTC_Clockwatch_main.c.

#define SET_MINUTE 59 /*< Set minute to the RTC */

Definition at line 186 of file RTC_Clockwatch_main.c.

#define SET_MONTH 12 /*< Set month to the RTC */

Definition at line 190 of file RTC_Clockwatch_main.c.

#define SET_SECOND 31 /*< Set second to the RTC */

Definition at line 187 of file RTC_Clockwatch_main.c.

#define SET_WEEKDAY 7 /*< Set weekday to the RTC */

Definition at line 188 of file RTC_Clockwatch_main.c.

#define SET_YEAR 2014 /*< Set year to the RTC */

Definition at line 191 of file RTC_Clockwatch_main.c.

## Function Documentation

int main | ( | void |  | ) |

Main program code.

Parameters

  None |

Return values

  None |

Definition at line 218 of file RTC_Clockwatch_main.c.

void RTC_Clockwatch_Configuration | ( | void |  | ) |

RTC clockwatch configuration.

Parameters

  None |

Return values

  None |

Definition at line 286 of file RTC_Clockwatch_main.c.

void RTC_Timer_Configuration | ( | void |  | ) |

RTC Configuration.

Parameters

  None |

Return values

  None |

< Periodic RTC mode

< Pattern size set to 1

< Enable 0.5s timer period

< RTC_TLR1 selected for time generation

Delay between two write in RTC0->TCR register has to be at least 3 x 32k cycle + 2 CPU cycle. For that reason it is neccessary to add the delay.

Definition at line 246 of file RTC_Clockwatch_main.c.