Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE
Hi everyone,
I implemented the TMS320f228379D LAB11 and it worked fine.
But I want to use DAC A and DAC B at the same time.
I made an edit (change) on this work as follows;
ADC data will be read from AA3 and AA4 pins.
ADC data read from AA3 and AA4 pins will be transferred as DAC data from AA0 and AA1 pins, respectively.
But I can't get DAC data from AA0 pin.
My DAC configuration part is as follows;
void InitDac(void)
{
asm(" EALLOW"); // Enable EALLOW protected register access
CpuSysRegs.PCLKCR16.bit.DAC_A=1;
DacaRegs.DACCTL.all = 0x0001;
DacaRegs.DACVALS.all = 0x0000; // DACVALS = bits 11-0, bits 15-12 reserved
DacaRegs.DACOUTEN.bit.DACOUTEN = 1; // DAC output enable, 0=disable, 1=enable
DacaRegs.DACLOCK.all = 0x0000; // Write a 1 to lock (cannot be cleared once set)
CpuSysRegs.PCLKCR16.bit.DAC_B = 1;
DacbRegs.DACCTL.all = 0x0001;
DacbRegs.DACVALS.all = 0x0800; // DACVALS = bits 11-0, bits 15-12 reserved
DacbRegs.DACOUTEN.bit.DACOUTEN = 1; // DAC output enable, 0=disable, 1=enable
DacbRegs.DACLOCK.all = 0x0000; // Write a 1 to lock (cannot be cleared once set)
asm(" EDIS"); // Disable EALLOW protected register access
} // end of InitDac()
I am thankful for any hint and advice.
Best regards...