Hello,
I have the following very simple code
GpioDataRegs.GPADAT.bit.GPIO21 = 1; GpioDataRegs.GPADAT.bit.GPIO20 = 1; GpioDataRegs.GPADAT.bit.GPIO19 = 1;
GPIO19 and GPIO21 get set high. However for some reason, GPIO20 is not getting set high. (I see this both when I look at GPIO20 with a scope and when I look at the GpioDataRegs in the Registers tab in the Code Composer Studio debugger.)
What makes this even stranger is that if I change my code to:
GpioDataRegs.GPADAT.bit.GPIO21 = 1; GpioDataRegs.GPADAT.bit.GPIO19 = 1; GpioDataRegs.GPADAT.bit.GPIO20 = 1;
Then GPIO21 and GPIO20 get set high, but not GPIO19. So it seems like whatever one I have in the middle is not getting set.
However, if from the Registers tab in Code Composer Studio, I manually set all three high, then all three go high and remain high (both in the debugger and on the scope).
I'm at a loss to explain this weird behavior. Am I missing something simple or is it possible that the TMS320F28379D chip is damaged?
I am setting the GpioCtrlRegs to outputs in my code.
EALLOW; GpioCtrlRegs.GPADIR.bit.GPIO21 = 1; GpioCtrlRegs.GPADIR.bit.GPIO20 = 1; GpioCtrlRegs.GPADIR.bit.GPIO19 = 1; EDIS;
I've tried recycling power to the microcontroller, restarting Code Composer Studio, and restarting my computer. The same behavior persists.
Thanks,
Kevin