This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432P401R: how to program LMK61E2 and LMX2592 using MSP432P401R

Part Number: MSP432P401R
Other Parts Discussed in Thread: TIDA-00626, USB2ANY, LMX2592, LMK61E2

I have been developing the reference design of TIDA-00626 in the reference design USB2ANY have been used and have mentioned to program it using such microcontroller please guide us on how to program that IC using this launchpad as the software of LMK61xx Oscillator Programming Tool only contains the interface of USB2ANY

  • Pratik,

     The TIDA-00626 User Guide, section 3.5, indicates that the LMX2592 can take a SPI interface to control the RF synthesizer. Section 7.5 of the LMX2592 datasheet describes the programming sequence required to configure the internal registers. In this case a 24-bit value consisting of the following:

    RW bit, Addr[6:0], Data[15:0]

    This 24bit value is constructed in the MSP432 or other microcontroller in 3 bytes which are then sent to the SPI peripheral. A code snippet of how to build this 24bit value and send it out the SPI port is shown below. See the spi_3wire_incrementing_data-master.c example for complete details on how to use driverlib API calls to drive the SPI port. 

    // below assumes SPI port configured in MSB-first mode
    uint8_t  Byte1, Byte2, Byte3;
    uint8_t  RW, Addr;  // 1-bit RW flag, 7-bit Address
    uint16_t Data;      // 16-bit Data

    Byte1 = RW <<7 | Addr; // (RW,Addr[6:0])
    Byte2 = Data >> 8;     // Shift upper byte down (upper byte only)
    Byte3 = Data & 0xFF;   // Mask out upper byte (lower byte only)

    SPI_transmitData(EUSCI_B0_BASE, Byte1);
    SPI_transmitData(EUSCI_B0_BASE, Byte2);
    SPI_transmitData(EUSCI_B0_BASE, Byte3);

    The  LMK61E2 datasheet  describes an I2C interface to program its registers. For I2C, a device address plus a register address must be passed to the device followed by a data byte. Refer to Table 1 in this datasheet to determine the correct Slave Address to use depending on the values on the ADD pins of that device. The closest MSP432 example that illustrates how to drive the I2C port of the LMK61E2 is i2c_master_w_multibyte_multislave-master_code. Like the LMX2592 above, you will need to construct the register address & data to send to the device for configuration. The API to use for sending the data is below:

    // See the I2C example for full details of I2C peripheral setup 

    /* Specify slave address. See Table 1 of LMK61E2 datasheet for description*/
    MAP_I2C_setSlaveAddress(EUSCI_B0_BASE, SLAVE_ADDRESS);

    MAP_I2C_masterSendMultiByteStart(EUSCI_B0_BASE, RegAddr);
    MAP_I2C_masterSendMultiByteStop(EUSCI_B0_BASE, Data);

    The above along with the datasheets should get you moving along on programming these devices. 

    Regards,

      Bob L.

  • I appreciate your feedback. I did some document reading over the topic but could not find actually how i can interface MSP432P401R. I would like to request you a small help to get me with the flow to program lmx2592 as without programming that our project is at standstill. What code should i write and how should i interface it to program lmx2592.

    Please help me solving this
  • Pratik,
    I believe I've helped you as much as I can in the previous post, which covers how to program LMX2592 along with additional references to pursue this further.
    Regards,
    Bo bL.

**Attention** This is a public forum