Part Number: MSP432P401R
Hi,
As , I am working on SPI cimmunication between msp432p401r and dac161s055.I have two issues now and need your advice.
1) I used SPI master increment example from driver library to do communication between msp432 and dac161s055 and it worked very well in start. But, now SDO port is not responpding anymore and there is no signal on it and it is P 1.7 (SDO or SOMI). I have changed nothing in my code. What can be the possibility for this problem??
2) In dac161s055, there is 24 bit (3 byte) data co,,unication and for asserting communication , SCLK should turn on for 24 clock cycles but in my case (using already mentioned example) I am getting just 8 clock pulses and which is not sufficient for my requirement. Please tell me how can I increase the clock cycles of SCLK ??
Code is attached for below:
const eUSCI_SPI_MasterConfig spiMasterConfig =
{
EUSCI_B_SPI_CLOCKSOURCE_SMCLK, // SMCLK Clock Source
24000000, // SMCLK = 24MHZ
1000000, // SPICLK = 1 MHz
EUSCI_B_SPI_MSB_FIRST, // MSB First
EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT, // Phase
EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_LOW, // High polarity
EUSCI_B_SPI_3PIN
};
/* Statics */
static volatile uint_fast16_t resultsBuffer[UINT8_MAX];
static volatile uint8_t resPos;
static volatile uint8_t RXData = 0;
static uint32_t TXData=0;
/* Selecting P1.5 P1.6 and P1.7 in SPI mode */
MAP_GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P1,
GPIO_PIN5 | GPIO_PIN6 | GPIO_PIN7, GPIO_PRIMARY_MODULE_FUNCTION);
/* P 6.0 and P6.6 for CSB and LDACB */
MAP_GPIO_setAsOutputPin(GPIO_PORT_P6, GPIO_PIN0);
MAP_GPIO_setOutputHighOnPin(GPIO_PORT_P6, GPIO_PIN0);
MAP_GPIO_setAsOutputPin(GPIO_PORT_P6, GPIO_PIN6);
MAP_GPIO_setOutputHighOnPin(GPIO_PORT_P6, GPIO_PIN6);
P:S: I am just new on embedded system side. So, may be my questions can be very basic.
Many thanks for your kind reply.
regards,
Hasan