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.

MSP430FR6043: USSSW_Lib_Gas

Part Number: MSP430FR6043

Hello,

I am following the Oxygen Concentration Sensing Application Report https://www.ti.com/lit/an/slaa976/slaa976.pdf?ts=1699286862922&ref_url=https%253A%252F%252Fwww.ti.com%252Ftool%252FEVM430-FR6043

I have the same board, and the same 200 kHz Jiakang Transducers and I would like to be able to record time of flight (TOF) from the USSSW_Lib_Gas software without the use of the GUI. 

My goal is to be able to record time of flight (TOF), like in the Application Report above, however, I would like to do it without being connected to my laptop and without the GUI. I would like to export time of flight data to a PWM signal and convert the PWM signal into a voltage signal. 

Does anyone know if this is possible or how I would go about doing this? Any reference material is greatly appreciated!

Thank you!

  • Hi Jonah,

    As for collecting the data without a laptop/GUI, I believe the USSSWLib_template_example is the example code that you are looking for. It shows how to run the algorithms and send the ToF data out via UART. 

    For exporting to a PWM signal and converting to a voltage signal, I do not think we have any example code for you. Could you explain further what you'd like to do for this? With that information I may be able to help see if it is possible and how to accomplish it.

  • We are trying to relay voltage because our controller only accepts a voltage signal. Thank you for sending the USSSWLib_template_example, that is a good place to start. We would like the code to start acquiring data on start up, and where in the code could we access the values of ToF?

    Thanks again for your help!

  • I see. Well the device does have PWM capabilities using the Timer A or Timer B modules ( see sections 25 and 26 in the device family user's guide for more information).

    As for accessing the ToF values: if you look in main(), you can see we initialize a variable "algResults" of type "USS_Algorithms_Results", which contains deltaTOF, totalTOF_UPS, totalTOF_DNS, etc. These values are all assigned using the USS_runAlgorithms() function. So after calling that function with &algResults as one of your parameters, the values will be updated and you can transmit them out using the method of your choice.

    Please let me know if this resolves your issue or if you need additional clarification.

  • That is very helpful, thank you, I will continue to work on this next week. I do have another question, about acquiring data on startup: where in the code would I have to change to be able to have data acquisition start as soon as the board is turned on?

  • When using the template example, the only functions that are called before starting data collection are the ones that are necessary for it to start. So the data collection is already happening about as quickly after start up as it ever could. If you need to start data collection very quickly in your application I recommend that you preemptively start up the device so you don't need to wait.

  • Thank you Dylan, I will work on this over the next few weeks, this has been very helpful!

**Attention** This is a public forum