Hello,
On concerto control card i am using some of the GPIO as output and trying to toggle them in 1 sec timer interrupt for testing purpose.
int count=0;
__interrupt void cpu_timer0_isr(void)
{
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
count++;
if(count==1)
{
// GPIO high
GpioG1DataRegs.GPADAT.bit.GPIO23 =1;
GpioG1DataRegs.GPADAT.bit.GPIO25 =1;
GpioG1DataRegs.GPBDAT.bit.GPIO42 =1;
GpioG1DataRegs.GPBDAT.bit.GPIO45 =1;
GpioG1DataRegs.GPBDAT.bit.GPIO46 =1;
}
else if(count == 2)
{
// GPIO Low
GpioG1DataRegs.GPADAT.bit.GPIO23 =0;
GpioG1DataRegs.GPADAT.bit.GPIO25 =0;
GpioG1DataRegs.GPBDAT.bit.GPIO42 =0;
GpioG1DataRegs.GPBDAT.bit.GPIO45 =0;
GpioG1DataRegs.GPBDAT.bit.GPIO46 =0;
count =0;
}
for all above GPIO, i have done configuration of DIR and Mux registers properly. But still GPIO's are not getting toggled.
Also i used one more method for toggling GPIO, that is as below
int count=0;
__interrupt void cpu_timer0_isr(void)
{
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
GpioG1DataRegs.GPATOGGLE.bit.GPIO23 =1;
GpioG1DataRegs.GPATOGGLE.bit.GPIO25 =1;
GpioG1DataRegs.GPBTOGGLE.bit.GPIO42 =1;
GpioG1DataRegs.GPBTOGGLE.bit.GPIO45 =1;
GpioG1DataRegs.GPBTOGGLE.bit.GPIO46 =1;
}
In this method, GPIO23 and GPIO25 are getting toggled. but others not. Also i observed while debugging that, on register level these bits are not getting toggle.
Please help me in this.
Regards,
Sandeep