Part Number:MSP430FR4133
Hi,
We are using MSP430FR4133 connected to an Accelerometer vis I2C bus.
We are using IAR 8
We would like to use P5 PIN2 and 3 or P8 PIN2 and 3 - please advice which is preferred.
We are trying to use EUSCI library - with no success:
This part pass:
EUSCI_B_I2C_initMasterParam param = {0};
param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_ACLK;
param.i2cClk = CS_getACLK();
param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_100KBPS;
param.byteCounterThreshold = 1;
param.autoSTOPGeneration = EUSCI_B_I2C_NO_AUTO_STOP;
EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, ¶m);
Not clear how to config the physical PINs (is that correct?)
EUSCI_B_I2C_remapPins(EUSCI_B0_BASE,2+3 );
GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P5 ,GPIO_PIN2 + GPIO_PIN3,GPIO_SECOND
This part also pass:
// EUSCI B I2C enableInterrupt(EUSCI_B0_BASE, EUSCI_B_I2C_TRANSMIT_INTERRUPT0 + EUSCI_B_I2C_STOP_INTERRUPT);
// Specify slave address
EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE, 0x0D);//SLAVE_ADDRESS);
//Set Master in TX mode
EUSCI_B_I2C_setMode(EUSCI_B0_BASE, EUSCI_B_I2C_TRANSMIT_MODE);
//Enable I2C Module to start operations
EUSCI_B_I2C_enable(EUSCI_B0_BASE);
And then I stock on this line:
EUSCI_B_I2C_masterSendSingleByte(EUSCI_B0_BASE,0x00);
Please advise.
In case you have a [pre[ared example I for MSP430FR4133 I would appreciate that.
BR,
Shimon