I'm pretty sure that the rtc_sample in the SDK covers both the on-chip RTC and the external 32 KHz LPO.
* RTC Sample
* This application provides the sample code for interfacing with
* the on-chip RTC clock. It is highly recommended that an external 32K
* xtal be used when accurate time is to be maintained. The accuracy
* of the time maintained with the an external LPO is an order of magnitude
* better than the internal LPO.
* Features demonstrated
* - Use of the on-chip RTC interface.
* - Use of the external 32 KHz LPO for sleep and deep sleep.
* - Entering deep sleep on demand.
* - Using the external LPO (32KHz xtal) for timed wake from deep sleep.
* To demonstrate the app, work through the following steps.
* 0. Enable the external 32KHz oscillator on the TAG board (see Quick Start Guide -
* make sure that R102 and R103 on BCM920737TAG_Q32 are populated
* with a 0 Ohm resistor, else the the behavior is undefined).
* 1. Plug the WICED eval board into your computer
* 2. Build and download the application (to the WICED board)
* 3. Application initializes and RTC and prints time every second.
* 3.a Application programs and enters deepsleep, optionally configuring for a timed wake.