Hi, I've asked a similar question before: Using K60 Enet to generate and receive PPS.
I didn't get any help that time but managed to get a bit further on my own. Basically what I'm trying to accomplish is to use the Output Compare functionality of the 1588 timer in the K60 processor to generate a PPS pulse. I've managed to get it to work if I set ENET_TSCR[TMODE] to 0101 (toggle output on compare). However I want the PPS pulse to be high 200 ms and low 800 ms. I therefore set ENET_TSCR[TMODE] to 1010 (clear output on compare, set output on overflow). However, this is not working. I also tried using 10X1 which is the reversed functionality and that doesnt work either. The output compare part seem to work but not the overflow one. Yet I am still able to receive interrupts on overflow, so at least some part of the overflow functionality is working correctly.
Since TMODE 0101 is working and 1010 is not working, is there something different that is needed when configuring the registers for these two functionalities? Or is it anything else I'm missing?
Here is my code:
PORTB_PCR2 = (0|PORT_PCR_MUX(4));
PORTB_PCR4 = (0|PORT_PCR_MUX(4));
ENET_TCCR0 = 0xBEBC200;
ENET_TCSR0 = ENET_TCSR_TMODE(10);
ENET_TCCR2 = 0x3B9AC000;
ENET_TCSR2 = ENET_TCSR_TMODE(5);
ENET_ATINC = 0x1414;
SIM_SOPT2 = SIM_SOPT2_TIMESRC(2);
ENET_ATCR |= ENET_ATCR_PEREN_MASK;
ENET_ATCR |= ENET_ATCR_PINPER_MASK;
ENET_ATCR |= ENET_ATCR_EN_MASK;