I have the following code implementation on a MSP-EXP430FR5994 board trying to get the B1 SPI module to function. void initSPIComms(void) { //Initialize EUSCI SPI B Master EUSCI_B_SPI_initMasterParam param = {0}; param.selectClockSource = EUSCI_B_SPI_CLOCKSOURCE_ACLK; param.clockSourceFrequency = 10000; param.desiredSpiClock = 1; param.msbFirst = EUSCI_B_SPI_MSB_FIRST; param.clockPhase = EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT; param.clockPolarity = EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_HIGH; param.spiMode = EUSCI_B_SPI_3PIN; GPIO_setAsPeripheralModuleFunctionOutputPin( GPIO_PORT_P5, GPIO_PIN0, //UCB1SIMO GPIO_PRIMARY_MODULE_FUNCTION); GPIO_setAsPeripheralModuleFunctionOutputPin( GPIO_PORT_P5, GPIO_PIN1, //UCB1MISO GPIO_PRIMARY_MODULE_FUNCTION); GPIO_setAsOutputPin(CSnRadioPort,CSnRadioPin); EUSCI_B_SPI_initMaster(EUSCI_B1_BASE, ¶m); //Enable SPI Module EUSCI_B_SPI_enable(EUSCI_B1_BASE); } When I run the code it goes off into the weeds on the EUSCI_B_SPI_initMaster(EUSCI_B1_BASE, ¶m); call. I was single stepping through and it ends up in the following area: void *memcpy(void *to, const void *from, size_t n) { register char *rto = (char *) to; register char *rfrom = (char *) from; register size_t rn; for (rn = 0; rn < n; rn++) *rto++ = *rfrom++; return (to); } in the memcpy.c source file and just never returns from there.
↧