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.

CCS/RM57L843: How to send 24 bit data on mibspi interface ?

Part Number: RM57L843
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Hello ,

I've interfaced AD5687 DAC (12 bit ) IC to Hercules RM57L843 through mibspi3 interface. In order to update DAC output , its count need to be send in 24bit command format mentioned below :

In Halcogen there is setting for 'Charlen', I've configured charlen as 8 bits. Now I've confusion , as below mentioned function require buffer pointer data type is as uint16_t  *

void mibspiSetData(mibspiBASE_t *mibspi, uint32 group, uint16 * data) 

while sending transfer group , I'm not able to understand how to incarporate 24 bit command in transmit buffer which is of type 'uint16_t' instead of 'uint8_t'

Please guide on the same .

Thank you.

  • Hello Tukaram,

    1. Configure charlen as 8 bits

    2. Set the CSHOLD bit: the nCS signal will not be deactivated until the next control field is loaded with new chip select information

    To use the APIs generated by HALCoGen, you need to re-org your data:

    uint32_t Data = 0x1A2B3C;  //24 bit data

    unit16_t txData[3] ={0};

    txData[0] = data & 0x00FF;

    txData[1] = data>>8 & 0x00FF;

    txData[2] = data>>16 & 0x00FF;

    mibspiSetData(mibspiREG1, 1, &txdata[0]) 

  • Hello Wang,

    Thank you for your input. Now I can transmit 24 bit command. but there is one observation , MOSI pin status is at logic 1 (logic high ) state before and after sending command.How to make it low before and after command ? 

  • Default HIGH or default LOW of SIMO doesn't affect the SPI transmission. To change the default value, you can add a pull-down resistor to SIMO signal.