Part Number: DAC81416EVM
Hello,
I would like to give you more information on the project and issue we are observing now.
- We are developing a Battery Cell voltage emulation module using a NXP MCU S32K144interfaced with TI DAC chip DAC81416.
- We are using S32K144EVM-Q100 evaluation board which is interfaced with our DAC81416EVM board through SPI.
- The SPI driver is working fine on the Micro controller module as a Master.
- We have configured the SPI module as a master, chip select as active low and data is clocked during SCK active low and 32 bit data per frame in Micro-controller module
- Here is the SPI configuration in main Micro-controller as a master.
const lpspi_master_config_t lpspi_0_MasterConfig0 = {
.bitsPerSec = 1000000UL,
.whichPcs = LPSPI_PCS1,
.pcsPolarity = LPSPI_ACTIVE_LOW,
.isPcsContinuous = false,
.bitcount = 32U,
.lpspiSrcClk = 8000000UL,
.clkPhase = LPSPI_CLOCK_PHASE_2ND_EDGE,
.clkPolarity = LPSPI_SCK_ACTIVE_LOW,
.lsbFirst = false,
.transferType = LPSPI_USING_INTERRUPTS,
.rxDMAChannel = 0U,
.txDMAChannel = 0U,
.callback = NULL,
.callbackParam = NULL
};
- The following registers are used to configure SPI (24 bit per frame) and send the data through DAC0 channel to convert the digital data to analog voltage. it was not working. Internal reference voltage is not available at TP12.
#define SPICONFIG 0x00030004u
#define GENCONFIG 0x00043F00u
#define BRDCONFIG 0x00050000u
#define SYNCCONFIG 0x00060000u
#define TOGGCONFIG0 0x00070000u
#define TOGGCONFIG1 0x00080000u
#define DACPWDWN 0x00090000u
#define DACRANGE0 0x000A0000u
#define DACRANGE1 0x000B0000u
#define DACRANGE2 0x000C0000u
#define DACRANGE3 0x000D0000u
#define TRIGGER 0x000E0000u
#define BRDCAST 0x000F0000u
#define OFFSET0 0x00200000u
#define OFFSET1 0x00210000u
#define OFFSET2 0x00220000u
#define OFFSET3 0x00230000u
- Since MSB is sent first (appended with zero on the last byte) , The following registers are updated to configure SPI and send the data through DAC0 channel to convert the digital data to analog voltage. it was not working. Internal reference voltage is not available at TP12.
#define SPICONFIG 0x03000400u
#define GENCONFIG 0x043F0000u
#define BRDCONFIG 0x05000000u
#define SYNCCONFIG 0x06000000u
#define TOGGCONFIG0 0x07000000u
#define TOGGCONFIG1 0x08000000u
#define DACPWDWN 0x09000000u
#define DACRANGE0 0x0A000000u
#define DACRANGE1 0x0B000000u
#define DACRANGE2 0x0C000000u
#define DACRANGE3 0x0D000000u
#define TRIGGER 0x0E000000u
#define BRDCAST 0x0F000000u
#define OFFSET0 0x20000000u
#define OFFSET1 0x21000000u
#define OFFSET2 0x22000000u
#define OFFSET3 0x23000000u
- Similarly the Data is sent in both formats and Voltages are not available at the output pin.
#define DAC0 0x00103FFFu
#define DAC1 0x00117FFFu
#define DAC14 0x001EBFFFu
#define DAC15 0x001FFFFFu
#define DAC0 0x103FFF00u
#define DAC1 0x117FFF00u
#define DAC14 0x1EBFFF00u
#define DAC15 0x1FFFFF00u
- It is clear that SPI driver is working as a master in the micro-controller 32 bit per frame. We could not configure this our DAC81416 and send the data through SPI and see the analog voltage at the output pin.
- MCU is configured for 32 bit per frame and DAC is configured for 24 bit per frame. How to handle the difference in frame (number of bits) length between MCU and DAC chip please?
Please help me out to fix this issue. We can have a teams meeting to show this issue better, If you are available. Also please call me on my mobile +44 7934 466587 to discuss in detail.
Many thanks
With kind regards
Siva