I've been trying unsuccessfully to get the 1Hz RTC clock to appear on PTB13, the RTC_CLKOUT pin.
Here is what I am doing to set-up the RTC and clocks to enable this to happen:
// (01)Set the clock ERCLK32K output on pin13, (00) clock not output
// Enable access and interrupts for RTC
// Enable a clock for the RTC so it can output the 1Hz clock, OSC32KCLK (00), LPO(11), RTC_CLKIN (10)
//Selects the RTC 1Hz (0) or OSCERCLK (1) Clock for output on RTC_CLKOUT pin
//Enable the time counter
//Enable the port
PORT_BWR_PCR_MUX(PORTB, 13, 0b011); //Set the Alt3 muxing on PortB, pin 13 for RTC_CLKOUT
GPIO_SET_PDDR(GPIOB, 1U<<13); //Set PORTB pin 13 to output
This does not work, I get a flat line on PTB13. I have played with the sequence of some of these commands, like enabling the time counter RTC_SR after the port definition, but no change. If I change the RTCCLKOUTSEL to 1, I do see the correct signal on PTB13. I am puzzled! Is there something I'm missing?
Also, what is the meaning of "Pad Interface" in Figure 5-4 from the user's manual?