/* RTT configuration function. 
Configure the RTT to generate a one second tick, which triggers the RTTINC interrupt.  */
void configure_rtt(void)
/* RTT configuration function. 
Configure the RTT to generate a one second tick, which triggers the RTTINC interrupt.  */
void configure_rtt(void)
{
	rtt_sel_source(RTT, false);
	rtt_init(RTT, 32768);
	NVIC_DisableIRQ(RTT_IRQn);
	NVIC_ClearPendingIRQ(RTT_IRQn);
	NVIC_SetPriority(RTT_IRQn, 0);
	NVIC_EnableIRQ(RTT_IRQn);
	rtt_enable_interrupt(RTT, RTT_MR_RTTINCIEN);
}