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.

LDC1614EVM: How to separate the Start streaming command "4C 05 01 00 06 01 29 04 04 30 2A C1" into sections of header, address, value and CRC-8?

Part Number: LDC1614EVM
Other Parts Discussed in Thread: LDC1612, LDC1312, LDC1314, LDC1614, ENERGIA

There is a  Inductive Sensing FAQ, Q3: How can I communicate directly with the MSP430 on the LDC1612, LDC1614, LDC1312, or LDC1314 EVM?

https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/295036/faq-inductive-sensing-faq---frequently-asked-questions

I have a close related question to the Q3 regarding "Start streaming command",  where it states  

To start streaming, send 4C 05 01 00 06 01 29 04 04 30 2A C1. After sending this command it is required to read 32 bytes.

I would like to know how to separate the the 12 bytes command word "4C 05 01 00 06 01 29 04 04 30 2A C1" into sections of  header, address, value and CRC-8. So that I can use the rule for other similar application.

Similar to the detailed explanation for Write register command below

Write register command is used to set desired register settings. It is formed as follow:

4C 15 01 00 04 2A XX YY YY ZZ

Where

4C 15 01 00 04 2A = Write register command header.

XX is the register address to be written, expressed as HEX. For example, if register 12 is x0C, so XX = 0C

YY YY is the 2 bytes of data to be written, in HEX, MSB 1st.

ZZ is CRC-8 check for the command string, which is explained below.

Each HEX value represents corresponding ASCII character, which is written to COM port.

For example, if we need to write to register 11 (x1B) a value of x820D, the command is

4C 15 01 00 04 2A 1B 82 0D A3.

  • Hi Guoxing,

    Thank you for posting to the Sensing forum.

    If I am understanding your question correctly, I believe that you should be able to use the bitwise shift operator to separate the word into bytes.

    Best regards,

    Nicole

  • Hi Nicole,

    I do not get your point, could you please separate it and let me know the result?

    Thanks,

    Gu

  • Hi Gu,

    For example, if you AND the command header with zeros and then define that as a new word, you can shift the bits of the new word so that the zeros go away and you are left with the command header that is now defined as its own word. You can then repeat that for the address, value, and CRC-8.

    Best regards,
    Nicole

  • Hi Nicole,

    I am sorry that I am really not  able to understand your description. 

    In either Arduino IDE or Energia IDE , no "header string" and CRC-8 check are used to write/read registers, hence I need to know separated header, address, data value and CRC-8 check out of the  command word "4C 05 01 00 06 01 29 04 04 30 2A C1", then I can write the data value to the address for setting streaming read in  Arduino IDE or Energia IDE.

    Regards,

    Gu

  • Hi Gu,

    I apologize if there were any misunderstandings.

    I do not believe that the start streaming command can be separated in the same way as a write register command. The word 4C 05 01 00 06 01 29 04 04 30 2A C1 is a special command to optimize data throughput. 

    Best regards,
    Nicole

  • Hi Nicole,

    Thank you for your reply.

    The streaming read can be set in Python and Labview using the command word 4C 05 01 00 06 01 29 04 04 30 2A C1, there must be a way to do the same thing in Arduino, Energia and CCS, etc. 

    No data sheet of   LDC1612, LDC1614, LDC1312, or LDC1314 EVM mentioned streaming read functionality. TI should disclose more info about the meaning behand the command word for streaming read. 

    Regards,

    Gu

  • Hi Gu,

    I apologize for the inconvenience, as I have been unable to find documentation regarding the separate components of this start streaming command. If you do not have any further questions, I will close this thread.

    Best regards,

    Nicole

  • Hi Nicole,

    Is it possible to escalate this issue to your higher tech services?

    Thanks,

    Gu

  • Hi Gu,

    The Start Streaming command is for the EVM’s MSP430, which may be why it is difficult to find information on this command when looking through the LDC1614 resources.

    I was able to find the host command in the EVM firmware source code: HOST_CMD_START_STREAM. To navigate to the EVM source code, please go to C:\ti\Sensing Solutions EVM GUI-1.10.0\EVM Firmware\Older Revs\FDC2x14_LDC13xxRevB_LDC16xxRevB_EVM_Firmware_source

    In the source code, the host_packet.h file defines HOST_CMD_START_STREAM on line 32. This file lists the standard MSP430 commands and error codes. In the host_interface.c file this start streaming command is used beginning on line 493.

    Best regards,

    Nicole

  • Hi Nicole,

    Thank you for your effort in finding a solution for me.

    The info gives me a right direction to go. I went through the host_packet.h file and the host_interface.c file, they are generic prototype C codes for both FDC and LDC EVMs. I am not an experienced programmer in C, hence it is a very challenge task for me to modify the codes to fit my application. 

    There is a sample source code for LDC13xx16xx_evm under  library folder,    

    C:\ti\Sensing Solutions EVM GUI-1.10.0\EVM Firmware\Older Revs\FDC2x14_LDC13xxRevB_LDC16xxRevB_EVM_Firmware_source\library

    It is a specific example and  easier to follow , however, there is no line addressing start stream.  Could I trouble you to help with inserting start and stop streams to the h and c files? once the library is done, it can be installed on either Arduino IDE or Energia IDE, I am more comfortable using the two platforms.

     

    Best regards,

    Gu

  • Hi Gu,

    I'm glad to hear that these resources are helpful.

    We are able to provide firmware and sample code as starting points to assist with design, but cannot guarantee any modifications outside of what is provided. If you encounter any issues with design or implementation, please feel free to create another thread with any questions.

    Best regards,

    Nicole

  • Hi Nicole, 

    I have a concern to create a new thread on E2E forum. I would like to keep it private because I might have to include my source code in my reply. This does not mean that I do not like to share the final solution on the forum, I just do not want other part of my source code to show up during trouble shooting. Once the problem is solved, I would like TI to update the  Inductive Sensing FAQ to include the  solution there without other part of my source code.

       https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/295036/faq-inductive-sensing-faq---frequently-asked-questions

    Could we use email communication directly for the new thread?

    Thanks,

    Gu

  • Gu,

    Nicole is out of the office at the moment.
    I will reach out via a friendship request so we can exchange information outside of the public forum.

    Regards,
    John

  • Hi John,

    I accepted your request.

    Thanks

    Gu,

  • Thank you Gu.

    At this point, what kind of help are you looking for?
    Regards,
    John