Hi! I´m using a LCDK138 board. It's been working great for me, and now I'm trying to work with the timer 64 module. I've been able to make it work when PLUSEN is disabled, but as soon as I enable it it stops working, even if that's all I do (I don´t change CAPMODE or any other register). I'd like to know if there is a reason this is happening.
I'll place the code I'm using below, and I'll show the part I add when it all falls apart. To check if it's working I have an ISR that counts the number of times the T64P0_OUT12 is thrown. When I don´t use the PLUSEN I get a number according to the time I left it running, if I use the PLUSEN only one interruption is counted.
void tmr_setup() {
Tmr0Regs->TGCR = 0;
Tmr0Regs->TGCR |= (1 << 2); // TIMMODE
// Tmr0Regs->TGCR |= (1 << 4); <--- This is the bit for the PLUSEN
Tmr0Regs->TGCR |= (1 << 0); // TIM12 not in Reset
Tmr0Regs->PRD12 = 0;
Tmr0Regs->PRD12 |= (150000 << 0); // (150MHz / n)
Tmr0Regs->REL12 = 0;
Tmr0Regs->REL12 |= (150000 << 0);
Tmr0Regs->TCR = 0;
Tmr0Regs->TCR |= (0 << 8); // Internal Clock
Tmr0Regs->TCR |= (3 << 6); // Enable 12, with cont. op. and prd reload
}