Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE, CONTROLSUITE
Hi, I am trying to read data from and write data to a ePWM register. I can read the whole register, but when I try to read half or just a single bit (e.g., EPwm2Regs.TBCTL.bit.PHSDIR), I get a compiling error:
error: taking the address of a bit field is not allowed
As a workaround, I read a whole register (EPwm2Regs.TBCTL), and then extract a single bit (PHSDIR = bit 13).
However, if I try to write to a single bit, I also get the same error.
I tried to use a similar approach: reading the whole register, changing a particular bit and then writing a new value to the same register, but this does not work. I can see the 13th bit changing on the DAC, but there is no ramp signal (TBCTR is zero).
Is it possible to write to only one bit? I suspect that I am overwriting some other bits of the TBCTL Register during this process, hence my ramp is zero
The model is attached.


