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.

Compiler/LMK04828: LMK04828 Example C Code

Part Number: LMK04828
Other Parts Discussed in Thread: CDCM6208

Tool/software: TI C/C++ Compiler

 Does TI offer example C code for the LMK04828?

  • G'day Chen,
    Firmware programmers like you and me command and monitor LMK04828 by writing and reading its registers via SPI transactions.
    Any example C code consists of a sequence of SPI writes and reads.
    The underlying question is, how to set up and monitor the LMK for my system's purposes?
    The answer depends on the system objectives and, when writing firmware for a legacy PWB, how the chip is connected.
    There are two paths we can go by:
    1) rely on TI's GUI to generate the series of SPI writes to configure the part, or
    2) understand the LMK's function at the register level, to come up with the values that achieve the objectives for your system.
    From what I've read in this forum, it looks like most of us choose path (1). On the other hand, friendly and knowledgeable people on the forums promptly and comprehensively address the questions I ask, making it surprisingly easy to succeed with path (2).
    Best of luck, and I hope you're able to enjoy wrapping your brain around this elegantly powerful timing chip.
    Cheers --todd

  • Hello Chen,

    As Todd pointed out, the simplest way to get going with LMK04828 is to use the TICS Pro EVM software to generate a programming configuration which you can export and program using some sort of SPI write command.

    When using JESD204B, because the SYNC and SYSREF paths are shared, if you're doing a JESD204B application, you'll need to do some subsequent programming after programming a full register map. Refer to section 9.3.2, JEDEC JESD204B in the datasheet for more details on programming sequence with JESD204B.

    73,
    Timothy
  • hello,
    using some sort ?Can you be more specific?

    Cheers --chen
  • Hello Chen,

    We'll I don't know what sort of platform you would be using. If you don't have one, consider an MSP430 microcontroller. We have an example for SPI programming of the CDCM6208 which could be adapted for LMK04828.

    See SCAA121 : A Step-by-Step Guide on Using the MSP430 as a Bootloader for the CDCM6208VxEVM
    See SLAC541 : Code for programming the MSP430 on the CDCM6208 evaluation module.

    73,
    Timothy

  • hello,
    I am using LM3S2D93.
    thank you.
  • Hi Chen,
    TI didn't develop LMK04828 based on LM3S2D93, but it doesn't matter.
    Now you can start to study how to use SPI interface on LM3S2D93, how to connect LM3S2D93 SPI with LMK04828 SPI interface.
    After the SPI communication is setup, LMK04828 GUI "TICS Pro" can tell "which registers and what values should be write or read".

    Regards,
    Shawn
  • hello,
    Is there any other ARM and lmk04828 spi interface? Are there examples of it? For reference.

    Regards,
    chen
  • Hello Chen,

    I'm afraid not. If you have further questions on how to program SPI on the microprocessor you are using, you will have to read materials associated with that processor / programming language or ask someone who can support that platform. Ideally there will be some SPI library which you can make a simple function call like, ConfigureSPI(???); with some options to configure a speed or pins used for SPI, then WriteSPI(0x012345); to actually write the register.

    If after you program the device you have an issue with the LMK04828 operation we can help you there.

    73,
    Timothy
  • hi,Shawn
    What is the difference between " TICS Pro" and " clock design tool" ?
    Which one is more convenient for design?

    Regards,
    Shawn
  • Hi Chen,
    "Clock Design Tool" is for loop filter design and jitter performance simulation, we can find the correct values for dividers and VCO frequency.
    After simulation, we could input parameters into "TICS Pro", which is an EVM control GUI, can generate raw registers. These register values could be used in your programming code.

    Regards,
    Shawn