Hi at all, I have a problem when whises make a change ConfigCpuTimer in real time.
I use at this moment the LEDBlink example, and change the isr timer0 (plus below), but the timer0 dont function when executes the final case 1.
There are any bit in any register that dont permit this operation (change the ConfigCpuTimer) ?
interrupt void cpu_timer0_isr(void)
{ CpuTimer0.InterruptCount++; GpioDataRegs.GPBTOGGLE.bit.GPIO32 = 1; // Toggle GPIO32 once per 500 milliseconds /////////////////////////////////////////////////////////////////////////////////////////// //inicio codigo guillermo //GpioDataRegs.GPBTOGGLE.bit.GPIO34 = 1; // Toggle GPIO32 //inicio codigo guillermo v2 switch (control)
{ case 0:{
contador++; if (contador==20)
{ control=1; contador=0; ConfigCpuTimer(&CpuTimer0, 150, 500000); } break;
} case 1:{
contador++; if (contador==20)
{ control=0; contador=0; ConfigCpuTimer(&CpuTimer0, 150,1000000 ); } break;
} } //fin switch //fin codigo guillermo v2 //fin codigo guillermo
/////////////////////////////////////////////////////////////////////////////////////////// // Acknowledge this interrupt to receive more interrupts from group 1 PieCtrlRegs.PIEACK.all = PIEACK_GROUP1; }