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.

TDC7200EVM: Seeking a description of what the demo firmware does.

Part Number: TDC7200EVM
Other Parts Discussed in Thread: MSP430WARE

Hi,

The TDC7200EVM software comes with two demo projects: "demo1_tdc720x_basic_rw" and "demo2_tdc720x_usb".

If documentation exists, describing what these apps do, could someone point me to it?

Thanks.

  • Hello,

    These projects are meant to illustrate the SPI register read/write procedure (demo1), and how to set up the USB communication between the EVM and a PC (demo2). Unfortunately no further documentation exists aside from the comments in the source code.

    Regards,
  • Hi Scott.
    I'm new to this programming environment and there is a lot to learn/absorb.
    As I pick through the demo(s), sometimes it's not immediately clear what the code is doing.
    This may sound like a silly question, but can i ignore code that occurs between compiler directives "if 0" and "endif"?
    Thanks.
  • Yes, that code will not run. It is just another method of commenting out large blocks of code with any easy way to re-include them if necessary.

    Regards,
  • Hi Scott,
    Thank you for clarifying the purpose of the disabled code.

    My I ask another question?
    I'm imagining a program architecture with two event handling functions (#pragma vector=) - one event handler handles measurement-ready events invoked by theTDC7200 "INTB", the other event handler handles USBCDC "user requests".
    In this scenario, my Main(void) funtion might serve little/no purpose...
    - is it necessary for Main() to not terminate?
    I've seen people use endless loops to keep Main() running - sometimes "free-running", that is, no "sleep" or other cpu-saving command.
    Is it not good practice to have some sort of sleep task in the endless-loop? If it doesn't matter, or may not matter, why not?

    Thanks/Cheers.
  • Using a sleep state is generally only done to reduce power consumption. If this is not a concern then it is not necessary to put the microcontroller to sleep.
  • Dear B Lench,
    MSPWare includes some well documented USB demos - see:
    C:\TI\msp\MSP430Ware_3_60_00_10\usblib430\MSP430_USB_Software\Documentation\Examples_Guide_MSP430_USB.pdf.
    Cheers!