MSP430UltrasonicLibrary  02_30_00_03
ussSwLib.h
Go to the documentation of this file.
1 /* --COPYRIGHT--,TI
2  *MSP Source and Object Code Software License Agreement
3  *
4  *
5  **IMPORTANT - PLEASE CAREFULLY READ THE FOLLOWING LICENSE AGREEMENT, WHICH IS LEGALLY BINDING. AFTER YOU READ IT, YOU WILL BE ASKED WHETHER YOU ACCEPT AND AGREE TO ITS TERMS. DO NOT CLICK "I ACCEPT" UNLESS: (1) YOU WILL USE THE LICENSED MATERIALS FOR YOUR OWN BENEFIT AND PERSONALLY ACCEPT, AGREE TO AND INTEND TO BE BOUND BY THESE TERMS; OR (2) YOU ARE AUTHORIZED TO, AND INTEND TO BE BOUND BY, THESE TERMS ON BEHALF OF YOUR COMPANY.
6  *
7  *
8  **Important - Read carefully: This Source and Object Code Software License Agreement ("Agreement") is a legal agreement between you and Texas Instruments Incorporated ("TI"). In this Agreement "you" means you personally if you will exercise the rights granted for your own benefit, but it means your company (or you on behalf of your company) if you will exercise the rights granted for your company's benefit. The "Licensed Materials" subject to this Agreement include the software programs and any associated electronic documentation (in each case, in whole or in part) that accompany this Agreement, are set forth in the applicable software manifest and you access "on-line", as well as any updates or upgrades to such software programs or documentation, if any, provided to you at TI's sole discretion. The Licensed Materials are specifically designed and licensed for use solely and exclusively with MSP microcontroller devices manufactured by or for TI ("TI Devices"). By installing, copying or otherwise using the Licensed Materials you agree to abide by the provisions set forth herein. This Agreement is displayed for you to read prior to using the Licensed Materials. If you choose not to accept or agree with these provisions, do not download or install the Licensed Materials.
9  *
10  **Note Regarding Possible Access to Other Licensed Materials: The Licensed Materials may be bundled with software and associated electronic documentation, if any, licensed under terms other than the terms of this Agreement (in whole or in part, "Other Licensed Materials"), including, for example Open Source Software and/or TI-owned or third party Proprietary Software licensed under such other terms. "Open Source Software" means any software licensed under terms requiring that (A) other software ("Proprietary Software") incorporated, combined or distributed with such software or developed using such software: (i) be disclosed or distributed in source code form; or (ii) otherwise be licensed on terms inconsistent with the terms of this Agreement, including but not limited to permitting use of the Proprietary Software on or with devices other than TI Devices, or (B) require the owner of Proprietary Software to license any of its patents to users of the Open Source Software and/or Proprietary Software incorporated, combined or distributed with such Open Source Software or developed using such Open Source Software.
11  *
12  **If by accepting this Agreement, you gain access to Other Licensed Materials, they will be listed in the applicable software manifest. Your use of the Other Licensed Materials is subject to the applicable other licensing terms acknowledgements and disclaimers as specified in the applicable software manifest and/or identified or included with the Other Licensed Materials in the software bundle. For clarification, this Agreement does not limit your rights under, or grant you rights that supersede, the terms of any applicable Other Licensed Materials license agreement. If any of the Other Licensed Materials is Open Source Software that has been provided to you in object code only under terms that obligate TI to provide to you or show you where you can access the source code versions of such Open Source Software, TI will provide to you, or show you where you can access, such source code if you contact TI at Texas Instruments Incorporated, 12500 TI Boulevard, Mail Station 8638, Dallas, Texas 75243, Attention: Contracts Manager, Embedded Processing. In the event you choose not to accept or agree with the terms in any applicable Other Licensed Materials license agreement, you must terminate this Agreement.
13  *
14  **1. License Grant and Use Restrictions.
15  *
16  **a. Licensed Materials License Grant. Subject to the terms of this Agreement, TI hereby grants to you a limited, non-transferable, non-exclusive, non-assignable, non-sublicensable, fully paid-up and royalty-free license to:
17  *
18  * i. Limited Source Code License: make copies, prepare derivative works, display internally and use internally the Licensed Materials provided to you in source code for the sole purpose of developing object and executable versions of such Licensed Materials, or any derivative thereof, that execute solely and exclusively on TI Devices, for end use in Licensee Products, and maintaining and supporting such Licensed Materials, or any derivative thereof, and Licensee Products. For purposes of this Agreement, "Licensee Product" means a product that consists of both hardware, including one or more TI Devices, and software components, including only executable versions of the Licensed Materials that execute solely and exclusively on such TI Devices.
19  *
20  * ii. Object Code Evaluation, Testing and Use License: make copies, display internally, distribute internally and use internally the Licensed Materials in object code for the sole purposes of evaluating and testing the Licensed Materials and designing and developing Licensee Products, and maintaining and supporting the Licensee Products;
21  *
22  * iii. Demonstration License: demonstrate to third parties the Licensed Materials executing solely and exclusively on TI Devices as they are used in Licensee Products, provided that such Licensed Materials are demonstrated in object or executable versions only and
23  *
24  * iv. Production and Distribution License: make, use, import, export and otherwise distribute the Licensed Materials as part of a Licensee Product, provided that such Licensee Products include only embedded executable copies of such Licensed Materials that execute solely and exclusively on TI Devices.
25  *
26  * b. Contractors. The licenses granted to you hereunder shall include your on-site and off-site contractors (either an individual or entity), while such contractors are performing work for or providing services to you, provided that such contractors have executed work-for-hire agreements with you containing applicable terms and conditions consistent with the terms and conditions set forth in this Agreement and provided further that you shall be liable to TI for any breach by your contractors of this Agreement to the same extent as you would be if you had breached the Agreement yourself.
27  *
28  * c. No Other License. Nothing in this Agreement shall be construed as a license to any intellectual property rights of TI other than those rights embodied in the Licensed Materials provided to you by TI. EXCEPT AS PROVIDED HEREIN, NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY OTHER TI INTELLECTUAL PROPERTY RIGHTS IS GRANTED HEREIN.
29  *
30  * d. Covenant not to Sue. During the term of this Agreement, you agree not to assert a claim against TI or its licensees that the Licensed Materials infringe your intellectual property rights.
31  *
32  * e. Restrictions. You shall maintain the source code versions of the Licensed Materials under password control protection and shall not disclose such source code versions of the Licensed Materials, to any person other than your employees and contractors whose job performance requires access. You shall not use the Licensed Materials with a processing device other than a TI Device, and you agree that any such unauthorized use of the Licensed Materials is a material breach of this Agreement. You shall not use the Licensed Materials for the purpose of analyzing or proving infringement of any of your patents by either TI or TI's customers. Except as expressly provided in this Agreement, you shall not copy, publish, disclose, display, provide, transfer or make available the Licensed Materials to any third party and you shall not sublicense, transfer, or assign the Licensed Materials or your rights under this Agreement to any third party. You shall not mortgage, pledge or encumber the Licensed Materials in any way. You may use the Licensed Materials with Open Source Software or with software developed using Open Source Software tools provided you do not incorporate, combine or distribute the Licensed Materials in a manner that subjects the Licensed Materials to any license obligations or any other intellectual property related terms of any license governing such Open Source Software.
33  *
34  * f. Termination. This Agreement is effective on the date the Licensed Materials are delivered to you together with this Agreement and will remain in full force and effect until terminated. You may terminate this Agreement at any time by written notice to TI. Without prejudice to any other rights, if you fail to comply with the terms of this Agreement or you are acquired, TI may terminate your right to use the Licensed Materials upon written notice to you. Upon termination of this Agreement, you will destroy any and all copies of the Licensed Materials in your possession, custody or control and provide to TI a written statement signed by your authorized representative certifying such destruction. Except for Sections 1(a), 1(b) and 1(d), all provisions of this Agreement shall survive termination of this Agreement.
35  *
36  **2. Licensed Materials Ownership. The Licensed Materials are licensed, not sold to you, and can only be used in accordance with the terms of this Agreement. Subject to the licenses granted to you pursuant to this Agreement, TI and its licensors own and shall continue to own all right, title and interest in and to the Licensed Materials, including all copies thereof. You agree that all fixes, modifications and improvements to the Licensed Materials conceived of or made by TI that are based, either in whole or in part, on your feedback, suggestions or recommendations are the exclusive property of TI and all right, title and interest in and to such fixes, modifications or improvements to the Licensed Materials will vest solely in TI. Moreover, you acknowledge and agree that when your independently developed software or hardware components are combined, in whole or in part, with the Licensed Materials, your right to use the combined work that includes the Licensed Materials remains subject to the terms and conditions of this Agreement.
37  *
38  **3. Intellectual Property Rights.
39  *
40  * a. The Licensed Materials contain copyrighted material, trade secrets and other proprietary information of TI and its licensors and are protected by copyright laws, international copyright treaties, and trade secret laws, as well as other intellectual property laws. To protect TI's and its licensors' rights in the Licensed Materials, you agree, except as specifically permitted by statute by a provision that cannot be waived by contract, not to "unlock", decompile, reverse engineer, disassemble or otherwise translate to a human-perceivable form any portions of the Licensed Materials provided to you in object code format only, nor permit any person or entity to do so. You shall not remove, alter, cover, or obscure any confidentiality, trade secret, trade mark, patent, copyright or other proprietary notice or other identifying marks or designs from any component of the Licensed Materials and you shall reproduce and include in all copies of the Licensed Materials the copyright notice(s) and proprietary legend(s) of TI and its licensors as they appear in the Licensed Materials. TI reserves all rights not specifically granted under this Agreement.
41  *
42  * b. Certain Licensed Materials may be based on industry recognized standards or software programs published by industry recognized standards bodies and certain third parties may claim to own patents, copyrights, and other intellectual property rights that cover implementation of those standards. You acknowledge and agree that this Agreement does not convey a license to any such third party patents, copyrights, and other intellectual property rights and that you are solely responsible for any patent, copyright, or other intellectual property right claim that relates to your use or distribution of the Licensed Materials or your use or distribution of your products that include or incorporate the Licensed Materials. Moreover, you acknowledge that you are responsible for any fees or royalties that may be payable to any third party based on such third party's interests in the Licensed Materials or any intellectual property rights that cover implementation of any industry recognized standard, any software program published by any industry recognized standards bodies or any other proprietary technology.
43  *
44  **4. Confidential Information. You acknowledge and agree that the Licensed Materials contain trade secrets and other confidential information of TI and its licensors. You agree to use the Licensed Materials solely within the scope of the licenses set forth herein, to maintain the Licensed Materials in strict confidence, to use at least the same procedures and degree of care that you use to prevent disclosure of your own confidential information of like importance but in no instance less than reasonable care, and to prevent disclosure of the Licensed Materials to any third party, except as may be necessary and required in connection with your rights and obligations hereunder; provided, however, that you may not provide the Licensed Materials to any business organization or group within your company or to customers or contractors that design or manufacture semiconductors unless TI gives written consent. You agree to obtain executed confidentiality agreements with your employees and contractors having access to the Licensed Materials and to diligently take steps to enforce such agreements in this respect. TI may disclose your contact information to TI's licensors.
45  *
46  **5. Warranties and Limitations. THE LICENSED MATERIALS ARE PROVIDED "AS IS". FURTHERMORE, YOU ACKNOWLEDGE AND AGREE THAT THE LICENSED MATERIALS HAVE NOT BEEN TESTED OR CERTIFIED BY ANY GOVERNMENT AGENCY OR INDUSTRY REGULATORY ORGANIZATION OR ANY OTHER THIRD PARTY ORGANIZATION. YOU AGREE THAT PRIOR TO USING, INCORPORATING OR DISTRIBUTING THE LICENSED MATERIALS IN OR WITH ANY COMMERCIAL PRODUCT THAT YOU WILL THOROUGHLY TEST THE PRODUCT AND THE FUNCTIONALITY OF THE LICENSED MATERIALS IN OR WITH THAT PRODUCT AND BE SOLELY RESPONSIBLE FOR ANY PROBLEMS OR FAILURES.
47  *
48  **TI AND ITS LICENSORS MAKE NO WARRANTY OR REPRESENTATION, EITHER EXPRESS, IMPLIED OR STATUTORY, REGARDING THE LICENSED MATERIALS, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT OF ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADE SECRETS OR OTHER INTELLECTUAL PROPERTY RIGHTS. YOU AGREE TO USE YOUR INDEPENDENT JUDGMENT IN DEVELOPING YOUR PRODUCTS. NOTHING CONTAINED IN THIS AGREEMENT WILL BE CONSTRUED AS A WARRANTY OR REPRESENTATION BY TI TO MAINTAIN PRODUCTION OF ANY TI SEMICONDUCTOR DEVICE OR OTHER HARDWARE OR SOFTWARE WITH WHICH THE LICENSED MATERIALS MAY BE USED.
49  *
50  **IN NO EVENT SHALL TI OR ITS LICENSORS, BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED, ON ANY THEORY OF LIABILITY, IN CONNECTION WITH OR ARISING OUT OF THIS AGREEMENT OR THE USE OF THE LICENSED MATERIALS REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, COST OF REMOVAL OR REINSTALLATION, OUTSIDE COMPUTER TIME, LABOR COSTS, LOSS OF DATA, LOSS OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR LOSS OF USE OR INTERRUPTION OF BUSINESS. IN NO EVENT WILL TI'S OR ITS LICENSORS' AGGREGATE LIABILITY UNDER THIS AGREEMENT OR ARISING OUT OF YOUR USE OF THE LICENSED MATERIALS EXCEED FIVE HUNDRED U.S. DOLLARS (US$500).
51  *
52  * Because some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages or limitation on how long an implied warranty lasts, the above limitations or exclusions may not apply to you.
53  *
54  **6. Indemnification Disclaimer. YOU ACKNOWLEDGE AND AGREE THAT TI SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY YOU AGAINST ANY THIRD PARTY INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON YOUR MANUFACTURE, USE, OR DISTRIBUTION OF THE LICENSED MATERIALS OR YOUR MANUFACTURE, USE, OFFER FOR SALE, SALE, IMPORTATION OR DISTRIBUTION OF YOUR PRODUCTS THAT INCLUDE OR INCORPORATE THE LICENSED MATERIALS.
55  *
56  **7. No Technical Support. TI and its licensors are under no obligation to install, maintain or support the Licensed Materials.
57  *
58  **8. Notices. All notices to TI hereunder shall be delivered to Texas Instruments Incorporated, 12500 TI Boulevard, Mail Station 8638, Dallas, Texas 75243, Attention: Contracts Manager - Embedded Processing, with a copy to Texas Instruments Incorporated, 13588 N. Central Expressway, Mail Station 3999, Dallas, Texas 75243, Attention: Law Department - Embedded Processing. All notices shall be deemed served when received by TI.
59  *
60  **9. Export Control. The Licensed Materials are subject to export control under the U.S. Commerce Department's Export Administration Regulations ("EAR"). Unless prior authorization is obtained from the U.S. Commerce Department, neither you nor your subsidiaries shall export, re-export, or release, directly or indirectly (including, without limitation, by permitting the Licensed Materials to be downloaded), any technology, software, or software source code, received from TI, or export, directly or indirectly, any direct product of such technology, software, or software source code, to any person, destination or country to which the export, re-export, or release of the technology, software, or software source code, or direct product is prohibited by the EAR. You represent and warrant that you (i) are not located in, or under the control of, a national or resident of Cuba, Iran, North Korea, Sudan and Syria or any other country subject to a U.S. goods embargo; (ii) are not on the U.S. Treasury Department's List of Specially Designated Nationals or the U.S. Commerce Department's Denied Persons List or Entity List; and (iii) will not use the Licensed Materials or transfer the Licensed Materials for use in any military, nuclear, chemical or biological weapons, or missile technology end-uses. Any software export classification made by TI shall not be construed as a representation or warranty regarding the proper export classification for such software or whether an export license or other documentation is required for the exportation of such software.
61  *
62  **10. Governing Law and Severability; Waiver. This Agreement will be governed by and interpreted in accordance with the laws of the State of Texas, without reference to conflict of laws principles. If for any reason a court of competent jurisdiction finds any provision of the Agreement to be unenforceable, that provision will be enforced to the maximum extent possible to effectuate the intent of the parties, and the remainder of the Agreement shall continue in full force and effect. This Agreement shall not be governed by the United Nations Convention on Contracts for the International Sale of Goods, or by the Uniform Computer Information Transactions Act (UCITA). The parties agree that non-exclusive jurisdiction for any dispute arising out of or relating to this Agreement lies within the courts located in the State of Texas. Notwithstanding the foregoing, any judgment may be enforced in any United States or foreign court, and either party may seek injunctive relief in any United States or foreign court. Failure by TI to enforce any provision of this Agreement shall not be deemed a waiver of future enforcement of that or any other provision in this Agreement or any other agreement that may be in place between the parties.
63  *
64  **11. PRC Provisions. If you are located in the People's Republic of China ("PRC") or if the Licensed Materials will be sent to the PRC, the following provisions shall apply:
65  *
66  * a. Registration Requirements. You shall be solely responsible for performing all acts and obtaining all approvals that may be required in connection with this Agreement by the government of the PRC, including but not limited to registering pursuant to, and otherwise complying with, the PRC Measures on the Administration of Software Products, Management Regulations on Technology Import-Export, and Technology Import and Export Contract Registration Management Rules. Upon receipt of such approvals from the government authorities, you shall forward evidence of all such approvals to TI for its records. In the event that you fail to obtain any such approval or registration, you shall be solely responsible for any and all losses, damages or costs resulting therefrom, and shall indemnify TI for all such losses, damages or costs.
67  *
68  **b. Governing Language. This Agreement is written and executed in the English language and shall be authoritative and controlling, whether or not translated into a language other than English to comply with law or for reference purposes. If a translation of this Agreement is required for any purpose, including but not limited to registration of the Agreement pursuant to any governmental laws, regulations or rules, you shall be solely responsible for creating such translation.
69  *
70  **12. Contingencies. TI shall not be in breach of this Agreement and shall not be liable for any non-performance or delay in performance if such non-performance or delay is due to a force majeure event or other circumstances beyond TI's reasonable control.
71  *
72  **13. Entire Agreement. This is the entire agreement between you and TI and this Agreement supersedes any prior agreement between the parties related to the subject matter of this Agreement. Notwithstanding the foregoing, any signed and effective software license agreement relating to the subject matter hereof and stating expressly that such agreement shall control regardless of any subsequent click-wrap, shrink-wrap or web-wrap, shall supersede the terms of this Agreement. No amendment or modification of this Agreement will be effective unless in writing and signed by a duly authorized representative of TI. You hereby warrant and represent that you have obtained all authorizations and other applicable consents required empowering you to enter into this Agreement.
73  *
74  *
75  *
76  * --/COPYRIGHT--*/
77 
78 #ifndef _USSSWLIB_H_
79 #define _USSSWLIB_H_
80 
81 //#############################################################################
82 //
88 //
89 // Group: MSP
90 // Target Device: __DEVICE_NAME__
91 //
92 // (C) Copyright 2019, Texas Instruments, Inc.
93 //#############################################################################
94 
95 
96 //*****************************************************************************
97 // includes
98 //*****************************************************************************
99 #include <msp430.h>
100 
101 #include <stdint.h>
102 #include <stdbool.h>
103 #include <QmathLib.h>
104 #include <IQmathLib.h>
105 
106 #ifdef __cplusplus
107 
108 extern "C" {
109 #endif
110 
111 //*****************************************************************************
112 // defines
113 //*****************************************************************************
114 
118 #define USS_UUPS_PWR_REQ_IGN_INTERRUPT BIT0
119 
123 #define USS_UUPS_PWR_UP_TM_OUT_INTERRUPT BIT1
124 
128 #define USS_SAPH_DATA_ERR_ABORT_INTERRUPT BIT2
129 
133 #define USS_SAPH_TMF_TM_OUT_INTERRUPT BIT3
134 
139 #define USS_SAPH_SEQ_ACQ_DN_INTERRUPT BIT4
140 
145 #define USS_SAPH_PING_DN_INTERRUPT BIT5
146 
150 #define USS_HSPLL_PLL_UNLOCK_INTERRUPT BIT6
151 #define USS_SDHS_WINLO_INTERRUPT BIT7
155 
159 #define USS_SDHS_WINHI_INTERRUPT BIT8
160 
164 #define USS_SDHS_DTRDY_INTERRUPT BIT9
165 
169 #define USS_SDHS_SSTRG_INTERRUPT BITA
170 
174 #define USS_SDHS_ACQDONE_INTERRUPT BITB
175 
179 #define USS_SDHS_OVF_INTERRUPT BITC
180 
185 #define USS_TIMER_EXPIRED_INTERRUPT BITD
186 
190 #define USS_SAPH_SEQUENCE_STOPPED BITE
191 
195 #define USS_UUPS_STOPPED_BY_DEBUGGER BITF
196 
199  #define USS_SAPH_DMA_ACK_VIOLATION (0x00010000)
200 
203  #define USS_TIMER_EXPIRED_EVENT1_INTERRUPT (0x00020000)
204 
207  #define USS_TIMER_EXPIRED_EVENT2_INTERRUPT (0x00040000)
208 
211 #define USS_INTERRUPTS_MASK (0x0001DFFF)
212 
213 #define HARDWAREWREG16(x) (*((volatile uint16_t *)((uint16_t)x)))
214 
215 
216 // Backwards compatibility defines
217 // This backwards compatibility layer might be removed in future releases
218 
219 #define USS_Alg_dToF_Calculation_Option_gas USS_Alg_dToF_Calculation_Option_estimate
220 
222 #define USS_CAPTURE_SEQUENCE_SELECTION_CH0 0
223 #define USS_CAPTURE_SEQUENCE_SELECTION_CH1 1
225 #define USS_CAPTURE_SEQUENCE_SELECTION_CH0_CH1 2
227 #define USS_CAPTURE_SEQUENCE_SELECTION_CH1_CH0 3
229 #define USS_CAPTURE_SEQUENCE_SELECTION_CH0_CH0 4
231 #define USS_CAPTURE_SEQUENCE_SELECTION_CH1_CH1 5
233 #define USS_CAPTURE_SEQUENCE_SELECTION_CH0_CH1_CH0 6
235 #define USS_CAPTURE_SEQUENCE_SELECTION_CH1_CH0_CH1 7
237 #define USS_CAPTURE_SEQUENCE_SELECTION_CH0_CH0_CH0 8
239 #define USS_CAPTURE_SEQUENCE_SELECTION_CH1_CH1_CH1 9
241 #define USS_CAPTURE_SEQUENCE_SELECTION_CH0_CH1_CH0_CH1 10
243 #define USS_CAPTURE_SEQUENCE_SELECTION_CH1_CH0_CH1_CH0 11
245 #define USS_CAPTURE_SEQUENCE_SELECTION_CH0_CH0_CH0_CH0 12
247 #define USS_CAPTURE_SEQUENCE_SELECTION_CH1_CH1_CH1_CH1 13
249 
250 //*****************************************************************************
251 // typedefs
252 //*****************************************************************************
253 
257 typedef enum _USS_message_code_
258 {
259 
263 
264  // 1-20 reserved for SAPH messages
306 
307  // 21-40 reserved for HSPLL messages
324 
325  // 41-60 reserved for SDHS messages
345 
346  // 61-80 reserved for UUPS messages
357 
358 
359  // 81-100 reserved for measurement messages
364 
365  // 101- 120 reserved for stop error messages
372 
373  // 121 - 140 reserved for algorithms messages
439 
440  // 141 - 160 reserved for interrupt messages
445 
446  // 161-170 reserved for ISTOP messages
450 
451  // 171-190 reserved for calibration messages
484 
485  // 240-255 error
504 
510 {
518 
523 {
529 
530 
534 {
540 
545 {
551 
556 {
564 
568 {
574 
580 {
593 
601 {
611 
612 
620 {
626 
627 
631 {
639 
643 typedef enum _USS_test_channel_
644 {
650 
654 {
662 
666 {
678 
682 {
778 
782 {
786 
790 {
795 
799 {
805 
809 {
815 
816 
820 {
848 
849 
853 typedef enum USS_SDHS_Interrupt
854 {
868 
869 
873 typedef enum USS_SAPH_Interrupt
874 {
884 
887 typedef enum USS_UUPS_Interrupt
888 {
896 
897 
901 {
905 
907 typedef enum _USS_highFlow_option_ {
918 
922 {
923 
933 
937 {
951 
956 {
979 
980 
993 
1000 
1008 
1012 {
1015  int32_t iq16Slope;
1017  int32_t iq16Offset;
1020 
1024 {
1027  uint8_t numOfRanges;
1032 
1037 {
1038  int32_t iq16M0;
1040  int32_t iq16M1;
1042  int32_t iq16M2;
1044  int32_t iq16M3;
1047 
1051 {
1052  int32_t iq16Flow;
1056  int32_t iq16Temp;
1061 
1068 
1072 {
1077  uint8_t numOfFlows;
1081  uint8_t numOfTemps;
1089  uint8_t rowNum;
1091  uint8_t colNum;
1096 
1100 {
1101  const int32_t (*pTempLUT)[3];
1103  uint16_t tempLUTLength;
1111 
1118 
1126 
1130 {
1131  uint32_t mCLKFrequency;
1133  uint16_t LFXTFrequency;
1148 
1151 {
1154  uint16_t * pNumOfEPulsArray;
1155  uint16_t * pEPulsLPerArray;
1156  uint16_t * pEPulsHPerArray;
1157  uint16_t * pNumOfXPulsArray;
1158  uint16_t * pXPulsLPerArray;
1159  uint16_t * pXPulsHPerArray;
1161 
1164 {
1180  uint16_t * pNumOfEPulsArray;
1183  uint16_t * pEPulsLPerArray;
1186  uint16_t * pEPulsHPerArray;
1190  uint16_t * pNumOfXPulsArray;
1194  uint16_t * pXPulsLPerArray;
1198  uint16_t * pXPulsHPerArray;
1213 
1217 {
1218  uint8_t F1DutyCycle;
1221  uint8_t F2DutyCycle;
1224  uint8_t numOfF1Cycles;
1227  uint8_t numOfF2Cycles;
1231 
1234 {
1235  USS_measurement_pulse_generation_mode pulseGenMode;
1241  uint32_t F1Frequency;
1245  uint32_t F2Frequency;
1263 
1264 
1268 {
1282  uint32_t transducerFreq;
1285 
1286 
1290 {
1292  USS_measurement_end_of_sequence_state eofSequenceState;
1296  uint_least16_t startPPGCount;
1305  uint_least16_t turnOnADCCount;
1315  uint_least16_t startPGAandINBiasCount;
1325  uint_least16_t startADCsamplingCount;
1335  uint_least16_t restartCaptureCount;
1345  uint_least16_t captureTimeOutCount;
1358  USS_measurement_ULP_bias_delay ulpBiasDelay;
1362  USS_measurement_bias_impedance biasImpedance;
1364  USS_measurement_mux_charge_pump muxChargePumpMode;
1366  uint16_t startRxEnCount;
1370 
1374 {
1375  USS_HSPLL_input_clock_freq ussXtalFreq;
1388  uint16_t hspllTolerance;
1403 
1407 {
1433 
1437 {
1448  float dToFOffset;
1454 
1455 
1459 {
1460  uint32_t expectedResult;
1465  int32_t difference;
1468 
1472 {
1476  uint16_t sampleSize;
1503  uint16_t agcConstant;
1523  uint16_t maxCapture;
1533 
1537 {
1540 
1544 {
1552 
1557 {
1565 
1573  int32_t iq16Index;
1577 
1585 
1589 {
1590  uint16_t absTOFInterval;
1594 
1607  float dcOffset;
1613  uint8_t windowingMode;
1719  int16_t *pLEAMemBuffer1;
1723  int32_t *pNvMemBuffer;
1733  int32_t thresholdX1X3;
1746  uint32_t winNumCycles;
1762  uint16_t filterLength;
1764  int16_t *filterCoeffs;
1769  int16_t *pLEAMemBuffer2;
1784  int16_t *pBinaryPattern;
1809  USS_Alg_dToF_Calculation_Option dtoFCalcOption;
1817  const int16_t (*pInterpCorrectionTablePtr)[2];
1826  union {
1835  } calibObject;
1842 
1846 {
1848  float deltaTOF;
1862 
1866 {
1868  int32_t iq44DeltaTOF;
1882 
1883 
1887 {
1904 // USS_Algorithms_Object *algorithmsObject;
1905 // //!< Pointer to USS_Algorithms_Handle handle
1906  uint16_t validationKey;
1910 
1911 //*****************************************************************************
1912 // globals
1913 //*****************************************************************************
1917 extern volatile uint32_t USSSWLIB_USS_interrupt_status;
1918 
1920 extern volatile uint16_t USSSWLIB_USS_measurementPeriod;
1921 
1922 #ifdef USS_CALIBRATE_SIGNAL_GAIN_TEST
1923 extern int16_t ussMaxSignal[5];
1924 #endif
1925 //*****************************************************************************
1926 // the function prototypes
1927 //*****************************************************************************
1928 
1929 //*****************************************************************************
1930 //
1933 //
1934 //******************************************************************************
1935 /*******************************************************************************
1936  * USS SW LIBRARY MEASUREMENT APIS
1937  ******************************************************************************/
1950 
1995 
1998  USS_capture_power_mode_option powerMode);
1999 
2041 
2059  USS_stop_measurement_state stopMeasurementState);
2060 
2079 extern void USS_generateLPMDelay(
2081  USS_low_power_mode_option lpmMode,
2082  uint16_t count);
2083 
2100 extern void USS_configAppTimerPeriod(
2102  uint16_t count);
2103 
2123  USS_low_power_mode_option lpmMode);
2124 
2125 //******************************************************************************
2126 //
2127 // Close the Doxygen group.
2129 //
2130 //******************************************************************************
2131 
2132 /*******************************************************************************
2133  * USS SW LIBRARY CONFIGURATION UPDATE APIS
2134  ******************************************************************************/
2135 //*****************************************************************************
2136 //
2139 //
2140 //******************************************************************************
2183 
2210 
2239 
2267 
2287 
2310 extern inline USS_message_code USS_resetUSSModule(
2311  USS_SW_Library_configuration *config, bool reconfigUSSModule);
2312 
2313 //******************************************************************************
2314 //
2315 // Close the Doxygen group.
2317 //
2318 //******************************************************************************
2319 
2320 /*******************************************************************************
2321  * USS SW LIBRARY CALIBRATION APIS
2322  ******************************************************************************/
2323 //*****************************************************************************
2324 //
2327 //
2328 //******************************************************************************
2349  USS_calibration_hspll_results *testResults);
2350 
2363 
2364 
2374  USS_SW_Library_configuration *config, USS_dcOffEst_Calc_Mode mode);
2375 
2388  USS_dTof_absTof_offset_results *testResults,
2390 
2391 //******************************************************************************
2392 //
2393 // Close the Doxygen group.
2395 //
2396 //******************************************************************************
2397 
2398 /*******************************************************************************
2399  * USS SW LIBRARY ALGORITHMS APIS
2400  ******************************************************************************/
2401 //*****************************************************************************
2402 //
2405 //
2406 //******************************************************************************
2417 
2441 
2445 
2446 
2467  USS_Algorithms_Results *results);
2468 
2491 
2513 
2541 
2566  USS_Algorithms_Results *results);
2567 
2590 
2607  float temperature,
2609 
2623 
2637 
2658 
2659 
2677 
2688  USS_Algorithms_Results_fixed_point *pFixedResults,
2689  USS_Algorithms_Results *pFloatResults);
2690 
2700 
2707 extern bool USS_isAlgorithmChannelsSwapped(void);
2708 
2717  USS_SW_Library_configuration *config, float additionalCaptureDelay);
2718 
2727  USS_SW_Library_configuration *config, float dTofOffset);
2728 
2737  USS_absTOF_status_object *status);
2738 
2747  USS_absTOF_status_object *status);
2748 
2749 //******************************************************************************
2750 //
2751 // Close the Doxygen group.
2753 //
2754 //******************************************************************************
2755 
2756 /*******************************************************************************
2757  * USS SW LIBRARY APPLICATION DEBUG APIS
2758  ******************************************************************************/
2759 //*****************************************************************************
2760 //
2763 //
2764 //******************************************************************************
2785 
2788  USS_test_channel PPGChannel);
2789 
2831 
2833  USS_SW_Library_configuration *config, USS_test_channel SDHSChannel,
2835 
2855 
2858  USS_test_channel PPGChannel);
2859 
2868 
2875 extern int16_t* USS_getUPSPtr(USS_SW_Library_configuration *config);
2876 
2877 
2884 extern int16_t* USS_getDNSPtr(USS_SW_Library_configuration *config);
2885 
2892 extern uint8_t* USS_getAlgorithmObjPtr(void);
2893 
2899 extern uint16_t USS_getAlgorithmObjLength(void);
2900 
2901 //******************************************************************************
2902 //
2903 // Close the Doxygen group.
2905 //
2906 //******************************************************************************
2907 
2908 /*******************************************************************************
2909  * USS SW LIBRARY INTERRUPT CALLBACK REGISTER/UNREGISTER APIS
2910  ******************************************************************************/
2911 //*****************************************************************************
2912 //
2915 //
2916 //******************************************************************************
2932 extern void USS_registerSDHSInterruptCallback(USS_SDHS_Interrupt interruptNum,
2933  void function(void));
2946 extern void USS_registerSAPHInterruptCallback(USS_SAPH_Interrupt interruptNum,
2947  void function(void));
2948 
2959 extern void USS_registerUUPSInterruptCallback(USS_UUPS_Interrupt interruptNum,
2960  void function(void));
2961 
2972  void function(void));
2973 
2989  USS_SDHS_Interrupt interruptNum);
3001  USS_SAPH_Interrupt interruptNum);
3002 
3012  USS_UUPS_Interrupt interruptNum);
3013 
3022  USS_HSPLL_Interrupt interruptNum);
3023 
3024 //******************************************************************************
3025 //
3026 // Close the Doxygen group.
3028 //
3029 //******************************************************************************
3030 
3031 #ifdef __cplusplus
3032 }
3033 #endif // extern "C"
3034 
3035 #endif // end of _USSSWLIB_H_ definition
_USS_measurement_end_of_sequence_state_
This is the USS state after capture is done.
Definition: ussSwLib.h:653
int16_t posSearchRange
Positive search range for tracking envelope maximum.
Definition: ussSwLib.h:1780
USS channel remains in low state.
Definition: ussSwLib.h:559
float signalValueThresholdCheck
Definition: ussSwLib.h:1683
Generate a dual tone pulse.
Definition: ussSwLib.h:634
_USS_Alg_volume_flow_Calculation_Option_
Enumerated type for volume flow rate algorithm selection.
Definition: ussSwLib.h:1003
float cycleSlipThreshold
Definition: ussSwLib.h:1730
Definition: ussSwLib.h:378
_USS_measurement_ULP_bias_delay_
Allows user to select the ULP bias delay during USS Power up. sequence. The ULP bias allows a faster ...
Definition: ussSwLib.h:579
uint16_t * pNumOfEPulsArray
Definition: ussSwLib.h:1154
_USS_HSPLL_output_clk_freq_
Selects USS HSPLL output clock frequency.
Definition: ussSwLib.h:819
int32_t iq16minimumVFR
specifies minimum volume flow rate
Definition: ussSwLib.h:1013
Contains USS SW Lib Meter Configuration.
Definition: ussSwLib.h:1267
struct _USS_Algorithms_Flow_Meter_Constant_ USS_Algorithms_Flow_Meter_Constant
Contain meter constant for flow VFR calibration.
uint16_t USS_getAlgorithmObjLength(void)
The following API allows to obtain the length of the library algorithm object.
USS_message_code USS_initAlgorithms(USS_SW_Library_configuration *config)
The following API initializes USS_Algorithms_Handle based on user USS_Algorithms_User_Configuration, USS_System_Configuration, USS_Meter_Configuration and USS_Measurement_Configuration structs. Currently this API does not perform any parameter checks.
Interrupt for data error pending.
Definition: ussSwLib.h:875
uint16_t * pRAMPulseConfigArray
Definition: ussSwLib.h:1202
void USS_generateLPMDelay(USS_SW_Library_configuration *config, USS_low_power_mode_option lpmMode, uint16_t count)
The following API can be used to generate a Low Power Mode Delay. The API allows to select the desire...
Definition: ussSwLibMeasurement.c:251
Definition: ussSwLib.h:914
USS_HSPLL_Interrupt
Used to configure USS HSPLL interrupt callback.
Definition: ussSwLib.h:900
USS_message_code USS_generateMonoDualToneBinaryPattern(USS_SW_Library_configuration *config)
The following API is used to generate the binary pattern used by USS_Alg_AbsToF_Calculation_Option_lo...
Value 6 - This error is returned if startPPGCount is invalid.
Definition: ussSwLib.h:280
int16_t * USS_getDNSPtr(USS_SW_Library_configuration *config)
The following API allows to obtain the address were DNS capture starts. IMPORTANT: USS_configureUltra...
USS_measurement_pulse_polarity pulsePolarity
Allows user to control pulse polarity.
Definition: ussSwLib.h:1239
Contain temperature lookup table data.
Definition: ussSwLib.h:1099
USS_message_code USS_startUltrasonicMeasurement(USS_SW_Library_configuration *config, USS_capture_power_mode_option powerMode)
The following API can be used to trigger a USS Capture via software trigger. NOTE: User must call...
Definition: ussSwLibMeasurement.c:88
_USS_capture_power_mode_
Selects the desired power mode while USS capture is done, API will remain in this mode until capture ...
Definition: ussSwLib.h:522
int32_t iq16Slope
meter calibration constant
Definition: ussSwLib.h:1015
USS_Capture_Configuration * captureConfig
Pointer to USS_Capture_Configuration struct.
Definition: ussSwLib.h:1896
USS_SAPH_Interrupt
Selects appropiate USS SAPH interrupt (Used to register interrupt callback functions) ...
Definition: ussSwLib.h:873
Definition: ussSwLib.h:1559
uint32_t transducerFreq
Transducer Frequency in Hz.
Definition: ussSwLib.h:1282
USS HSPLL output frequency of 72 MHz.
Definition: ussSwLib.h:837
USS_Meter_Configuration * meterConfig
Pointer to USS_Meter_Configuration struct.
Definition: ussSwLib.h:1890
int32_t iq16Flow
Definition: ussSwLib.h:1052
_USS_Alg_temperature_Calculation_Option_
Enumerated type for temperature calculation.
Definition: ussSwLib.h:1114
USS_Pulse_Additional_End_of_Sequence_Configuration * pEOFSeqConfig
Definition: ussSwLib.h:1209
_USS_Alg_volume_flow_Calculation_state_
Enumerated type for flow temperature VFR calibration state machine.
Definition: ussSwLib.h:1064
USS general error codes.
Definition: ussSwLib.h:487
Configure PGA range to 25.8 dB.
Definition: ussSwLib.h:763
USS_measurement_pause_state pauseState
Specifies the line state during the acquisition sequence.
Definition: ussSwLib.h:1237
Definition: ussSwLib.h:908
int32_t iq16Temp
Definition: ussSwLib.h:1056
void USS_registerSAPHInterruptCallback(USS_SAPH_Interrupt interruptNum, void function(void))
The following API registers a function callback to the desired SAPH interrupt vector.
Definition: ussSwLibISR.c:72
int32_t iq16M2
specifies m2 constant
Definition: ussSwLib.h:1042
uint8_t rowNum
Used internally to track temperature row.
Definition: ussSwLib.h:1089
Start pulse generation with high pulse.
Definition: ussSwLib.h:569
bool isInitAlgorithms
This flag is used to indicate if the algorithms have been initialized.
Definition: ussSwLib.h:1713
uint16_t binaryPatternLength
Definition: ussSwLib.h:1790
USS_Alg_volume_Flow_Calib_Object * flowCalibObject
Definition: ussSwLib.h:1827
Configure PGA range to 14.9 dB.
Definition: ussSwLib.h:735
uint16_t agcConstant
Definition: ussSwLib.h:1503
int16_t windowHighThreshold
Definition: ussSwLib.h:1493
uint8_t winStartIndexBackOffNumCycles
Definition: ussSwLib.h:1694
USS_message_code USS_updateClockRelativeError(USS_SW_Library_configuration *config)
The following API allows user to update clockRelativeError parameter during runtime. The clockRelativeError parameter is used to by USS_runAlgorithms and USS_runAlgorithmsFixedPoint APIs. The clockRelativeError parameter is used to correct the UPS and DNS AbsTOF calculations. Refere to clockRelativeError description for for guidance on how to estimate this parameter using USS_verifyHSPLLFrequency API.
Definition: ussSwLib.h:783
int32_t iq16M3
specifies m3 constant
Definition: ussSwLib.h:1044
USS_measurement_ULP_bias_delay ulpBiasDelay
Definition: ussSwLib.h:1358
Configure PGA range to 12.2 dB.
Definition: ussSwLib.h:729
USS_Alg_temperature_Calculation_Object * tempCalcObject
Definition: ussSwLib.h:1836
USS HSPLL output frequency of 73 MHz.
Definition: ussSwLib.h:835
void USS_registerHSPLLInterruptCallback(USS_HSPLL_Interrupt interruptNum, void function(void))
The following API registers a function callback to the desired HSPLL interrupt vector.
Definition: ussSwLibISR.c:150
Contains USS SW Lib Algorithms Results.
Definition: ussSwLib.h:1845
enum _USS_stop_measurement_state_ USS_stop_measurement_state
Selects USS state after capture has been stopped.
uint_least16_t restartCaptureCount
Definition: ussSwLib.h:1335
bool isCalculateDnsAbsTofOffset
Definition: ussSwLib.h:1423
Configure PGA range to 21.5 dB.
Definition: ussSwLib.h:751
Configure PGA range to -1.4 dB.
Definition: ussSwLib.h:695
USS_message_code USS_verifyHSPLLFrequency(USS_SW_Library_configuration *config, USS_calibration_hspll_results *testResults)
The following API allows to verify the HSPLL frequency is set at the user selected pllOutputFreq_inHz...
Definition: ussSwLibCalibration.c:70
uint16_t * pXPulsHPerArray
Definition: ussSwLib.h:1198
USS_Alg_dToF_Calculation_Option dtoFCalcOption
Specifies Delta ToF Calculation option.
Definition: ussSwLib.h:1809
Value 136 - This error is returned if there was a correlation overrun.
Definition: ussSwLib.h:431
Value 44 - This error is returned if sample size is invalid.
Definition: ussSwLib.h:332
int32_t iq40TotalTOF_UPS
Upstream total Time Of Flight calculation result.
Definition: ussSwLib.h:1870
Interrupt for SDHS Data Ready.
Definition: ussSwLib.h:861
USS_message_code USS_testSDHSconversion(USS_SW_Library_configuration *config, USS_test_channel SDHSChannel, USS_capture_power_mode_option mode)
The following trigger manual SDHS conversion with current SDHS configuration. SDHS configuration is c...
Definition: ussSwLibAppDebug.c:58
struct _USS_Algorithms_Results_ USS_Algorithms_Results
Contains USS SW Lib Algorithms Results.
USS_HSPLL_input_clock_type HSPLLInputCLKType
Definition: ussSwLib.h:1376
enum _USS_measurement_ULP_bias_delay_ USS_measurement_ULP_bias_delay
Allows user to select the ULP bias delay during USS Power up. sequence. The ULP bias allows a faster ...
Allows user to specify the pulse configuration.
Definition: ussSwLib.h:1233
USS_message_code USS_calibrateSignalGain(USS_SW_Library_configuration *config)
The following API runs the SDHS Signal Gain calibration routine if no errors are encountered during S...
Definition: ussSwLibCalibration.c:366
Configure PGA range to 23.6 dB.
Definition: ussSwLib.h:757
Max drive strength will be applied.
Definition: ussSwLib.h:548
void USS_unregisterHSPLLInterruptCallback(USS_HSPLL_Interrupt interruptNum)
The following API unregisters a function callback to the desired HSPLL interrupt vector.
Definition: ussSwLibISR.c:162
USS_Alg_volume_flow_Calculation_Option volumeCalOption
Specifies Volume Flow Rate Calculation option.
Definition: ussSwLib.h:1811
struct _USS_absTOF_status_object_ USS_absTOF_status_object
Structure containing absTOF status object.
USS_absTOF_channel_status_object DNS
Definition: ussSwLib.h:1583
MSP remains in LPM0 power mode until USS capture is done.
Definition: ussSwLib.h:526
float totalTOF_UPS
Upstream total Time Of Flight calculation result.
Definition: ussSwLib.h:1850
int16_t calibratedDCOffsetUPS
Definition: ussSwLib.h:1705
Configure PGA range to 8.7 dB.
Definition: ussSwLib.h:719
int16_t * USS_getUPSPtr(USS_SW_Library_configuration *config)
The following API allows to obtain the address were UPS capture starts. IMPORTANT: USS_configureUltra...
Pre-trimmed drive strength will be applied.
Definition: ussSwLib.h:546
_USS_Alg_AbsToF_Calculation_Option_
Enumerated type for absTOF algorithm selection.
Definition: ussSwLib.h:983
uint16_t * pEPulsHPerArray
Definition: ussSwLib.h:1186
USS_Capture_Over_Sample_Rate overSampleRate
Definition: ussSwLib.h:1473
USS_message_code USS_getAbsTOFStatus(USS_SW_Library_configuration *config, USS_absTOF_status_object *status)
This function allows users to obtain the internal AbsTOF status. Including the state and index for th...
struct _USS_Capture_Configuration_ USS_Capture_Configuration
Contains USS SW Lib Capture Configuration.
USS_message_code USS_generateMultiToneBinaryPattern(USS_SW_Library_configuration *config)
The following API is used to generate the binary pattern used by USS_Alg_AbsToF_Calculation_Option_lo...
_USS_Trigger_Configuration_Trigger_
Selects USS trigger option.
Definition: ussSwLib.h:789
bool isCalculateUpsAbsTofOffset
Definition: ussSwLib.h:1418
uint16_t numOfTrillcycles
Definition: ussSwLib.h:1177
MSP remains in ACTIVE power mode until USS capture is done.
Definition: ussSwLib.h:524
Value 135 - This error is returned if shift value was greater than maxSampleShift.
Definition: ussSwLib.h:429
uint8_t numOfStopPulses
Definition: ussSwLib.h:1258
uint16_t LFXTFrequency
Low Frequency Crystal (LFXT) frequency in Hz.
Definition: ussSwLib.h:1133
struct _USS_Meter_Configuration_ USS_Meter_Configuration
Contains USS SW Lib Meter Configuration.
This mode will allow to achieve lowest power consumption.
Definition: ussSwLib.h:511
bool isCalculateDToFOffset
Definition: ussSwLib.h:1428
uint8_t numCycleSearchCorrPeak
The number of cycles to search for correlation peak.
Definition: ussSwLib.h:1686
Configure PGA range to 5.2 dB.
Definition: ussSwLib.h:711
int32_t iq16Temperature
Temperature calculation result.
Definition: ussSwLib.h:1879
USS goes to STANDBY state after capture is done.
Definition: ussSwLib.h:655
USS HSPLL output frequency of 68 MHz.
Definition: ussSwLib.h:845
float upsAbsToFOffset
Definition: ussSwLib.h:1438
_USS_highFlow_option_
Defines high flow computation options.
Definition: ussSwLib.h:907
USS HSPLL output frequency of 77 MHz.
Definition: ussSwLib.h:827
USS_message_code USS_updateUSSInterruptsConfiguration(USS_SW_Library_configuration *config)
The following function updates the UUPS module interrupt configuration based on user defined USS_Inte...
Definition: ussSwLibConfiguration.c:577
Value 62 - This error is returned if a UUPS Power up time out is detected.
Definition: ussSwLib.h:351
Configure PGA range to 24.6 dB.
Definition: ussSwLib.h:759
bool enableFilter
Definition: ussSwLib.h:1759
USS_HSPLL_input_clock_freq ussXtalFreq
Definition: ussSwLib.h:1375
Interrupt for SDHS Window High.
Definition: ussSwLib.h:863
This error is returned if an ASQ time out occurs.
Definition: ussSwLib.h:362
uint16_t * pNumOfXPulsArray
Definition: ussSwLib.h:1190
enum _USS_Alg_volume_flow_Calculation_state_ USS_Alg_volume_flow_Calibration_state
Enumerated type for flow temperature VFR calibration state machine.
int16_t negSearchRange
Negative search range for tracking envelope maximum.
Definition: ussSwLib.h:1778
int32_t iq16VolumeFlowRate
Volume flow rate calculation result.
Definition: ussSwLib.h:1874
Definition: ussSwLib.h:260
bool isCapAccumulationEnabled
Definition: ussSwLib.h:1525
int32_t iq44DeltaTOF
Delta Time Of Flight calculation result.
Definition: ussSwLib.h:1868
uint16_t tempLUTLength
Definition: ussSwLib.h:1103
float volumeFlowRate
Volume flow rate calculation result.
Definition: ussSwLib.h:1854
enum _USS_highFlow_option_ USS_highFlow_option
Defines high flow computation options.
float corrValueThresholdCheckFactor
Definition: ussSwLib.h:1702
struct _USS_Algorithms_User_Configuration_ USS_Algorithms_User_Configuration
Contains USS SW Lib Algorithms User Configuration.
Value 11 - This error is returned if startPGAandINBiasCount is invalid.
Definition: ussSwLib.h:290
Contains USS SW Lib configuration.
Definition: ussSwLib.h:1886
MSP remains in LPM0 power mode until timer expires.
Definition: ussSwLib.h:924
Configure PGA range to 7.7 dB.
Definition: ussSwLib.h:717
enum _USS_Alg_volume_flow_Calibration_Option_ USS_Alg_volume_flow_Calibration_Option
Enumerated type for volume flow rate calibration algorithm selection.
USS_Algorithms_Quad_Point * pQuadPoints
Pointer to USS_Algorithms_Quad_Point array.
Definition: ussSwLib.h:1075
USS_message_code USS_calibrateVolumeFlowRate(USS_SW_Library_configuration *config, USS_Algorithms_Results_fixed_point *results)
The following API calibrates Volume Flow Rate using fixed point math.
Definition: ussSwLibVFRCalib.c:11
int16_t indexMaxAmplitude
Definition: ussSwLib.h:1571
Interrupt for UUPS to indicate USS has been interrupted by debug.
Definition: ussSwLib.h:893
int32_t iq40TotalTOF_DNS
Downstream total Time Of Flight calculation result.
Definition: ussSwLib.h:1872
Configure PGA range to 30.8 dB.
Definition: ussSwLib.h:775
USS_Measurement_Configuration * measurementConfig
Pointer to USS_Measurement_Configuration struct.
Definition: ussSwLib.h:1892
Value 102 - This error is returned if a USS sequence is stopped by the debugger.
Definition: ussSwLib.h:368
USS_message_code USS_startLowPowerUltrasonicCapture(USS_SW_Library_configuration *config)
The following API has been power optimized for ultrasonic capture. The API controls the capture seque...
Definition: ussSwLibMeasurement.c:497
uint8_t sequenceSelection
Definition: ussSwLib.h:1291
USS_Alg_volume_flow_Calibration_state state
Used internally to track state of calibration state machine.
Definition: ussSwLib.h:1093
USS_message_code USS_updateUUPSConfiguration(USS_SW_Library_configuration *config)
The following function updates the UUPS module configuration based on user defined USS_Trigger_Config...
Definition: ussSwLibConfiguration.c:561
uint8_t winTrapzRampOverNumCycles
The number of cycles over which the trapezoid window should ramp.
Definition: ussSwLib.h:1697
_USS_absTOF_state_t_
Enumerated type for selection absTOF state.
Definition: ussSwLib.h:1556
USS_absTOF_state_t state
Definition: ussSwLib.h:1575
Configure PGA range to 11.7 dB.
Definition: ussSwLib.h:727
void * pToneConfig
Definition: ussSwLib.h:1249
int32_t iq16Index
Definition: ussSwLib.h:1573
USS_message_code USS_updateABSTOFCalculationIteration(USS_SW_Library_configuration *config)
The following API allows user to update the frequency at which the Absolute Time of Flight is calcula...
USS channel remains in high state.
Definition: ussSwLib.h:561
uint8_t F1DutyCycle
Definition: ussSwLib.h:1218
uint16_t validationKey
Definition: ussSwLib.h:1906
USS_measurement_pulse_generation_mode pulseGenMode
Determines the type of pulse to be generated.
Definition: ussSwLib.h:1235
USS_message_code USS_getResultsInFloat(USS_Algorithms_Results_fixed_point *pFixedResults, USS_Algorithms_Results *pFloatResults)
The following API allows user to convert the fixed point Algorithm results to floating point represen...
uint32_t F2Frequency
Definition: ussSwLib.h:1245
struct _USS_Algorithms_Results_fixed_point_ USS_Algorithms_Results_fixed_point
Contains USS SW Lib Algorithms Results.
float maxRatioPeak2PeakVariation
Definition: ussSwLib.h:1691
void USS_registerSDHSInterruptCallback(USS_SDHS_Interrupt interruptNum, void function(void))
The following API registers a function callback to the desired SAPH interrupt vector.
Definition: ussSwLibISR.c:19
uint16_t measurementPeriod
Time between measurements in ACLK cycle counts.
Definition: ussSwLib.h:1143
Definition: ussSwLib.h:1563
float dToFOffset
Definition: ussSwLib.h:1448
enum _USS_Alg_dToF_Calculation_Option_ USS_Alg_dToF_Calculation_Option
Enumerated type for dToF algorithm selection.
This structure is passed to USS_calculateOffsets API and calibration test result will be returned in ...
Definition: ussSwLib.h:1436
Disables ULP bias delay functionality.
Definition: ussSwLib.h:581
uint8_t searchQuadCount
Definition: ussSwLib.h:1085
void USS_unregisterSDHSInterruptCallback(USS_SDHS_Interrupt interruptNum)
The following API registers a function callback to the desired SAPH interrupt vector.
Definition: ussSwLibISR.c:46
float volumeScaleFactor
Definition: ussSwLib.h:1269
uint8_t numOfTemps
Definition: ussSwLib.h:1081
USS HSPLL output frequency of 69 MHz.
Definition: ussSwLib.h:843
The mux charge pump remains ON during the firing/capture sequence.
Definition: ussSwLib.h:621
enum _USS_measurement_drive_strength_ USS_measurement_drive_strength
Allows user to select USS channel drive strength. User can select between max strength and pre-trimme...
USS_message_code USS_runAlgorithms(USS_SW_Library_configuration *config, USS_Algorithms_Results *results)
The following API calculates Absolute ToF Upstream, Absolute ToF Downstream, Delta ToF...
Definition: ussSwLibAlgorithm.c:11
enum _USS_measurement_pulse_polarity_ USS_measurement_pulse_polarity
Allows user to select starting pulse state.
Value 28 - This error is returned if ussXTALsettlelingCount is 0.
Definition: ussSwLib.h:322
enum _USS_low_power_mode_option_ USS_low_power_mode_option
Selects the desired power mode while USS capture is done.
enum _USS_dcOffEst_Calc_Mode_ USS_dcOffEst_Calc_Mode
Selects the UPS/DNS DC offset estimation mode used by USS_estimateDCoffset API.
Value 23 - This error is returned if there is an error locking the PLL.
Definition: ussSwLib.h:312
Value 138 - This error is returned if there was a correlation threshold error.
Definition: ussSwLib.h:435
uint_least16_t startADCsamplingCount
Definition: ussSwLib.h:1325
uint16_t absTOFInterval
Definition: ussSwLib.h:1590
uint16_t * pXPulsLPerArray
Definition: ussSwLib.h:1158
Configure PGA range to 22.8 dB.
Definition: ussSwLib.h:755
uint_least16_t startPGAandINBiasCount
Definition: ussSwLib.h:1315
bool isUseLPMCapture
Definition: ussSwLib.h:1414
Configures SDHS Over Sample Rate to 160.
Definition: ussSwLib.h:675
Value 103 - This error is returned if the time between measurements is greater than measurementPeriod...
Definition: ussSwLib.h:370
Contains USS SW Lib System Configuration.
Definition: ussSwLib.h:1129
Configure PGA range to 6.0 dB.
Definition: ussSwLib.h:713
Configure PGA range to 26.7 dB.
Definition: ussSwLib.h:765
USS HSPLL output frequency of 80 MHz.
Definition: ussSwLib.h:821
Configure PGA range to -4.6 dB.
Definition: ussSwLib.h:687
USS_Trigger_Configuration_Trigger triggerConfig
Definition: ussSwLib.h:1538
uint32_t actualTestCount
Contains the average SAPH timer counts in 1 ACLK period.
Definition: ussSwLib.h:1463
Contain meter constant for flow VFR calibration.
Definition: ussSwLib.h:1011
Configure PGA range to -2.3 dB.
Definition: ussSwLib.h:693
Interrupt for SDHS Window Low.
Definition: ussSwLib.h:865
_USS_Capture_Over_Sample_Rate_
Configures SDHS Over Sample Rate Registers modified: SDHS.CTL0.OBR
Definition: ussSwLib.h:665
USS_UUPS_Interrupt
Used to configure USS UUPS interrupt callback.
Definition: ussSwLib.h:887
Configure PGA range to -0.8 dB.
Definition: ussSwLib.h:697
USS_message_code USS_startPPGToneGeneration(USS_SW_Library_configuration *config, USS_test_channel PPGChannel)
The following API will the tone generation output in the SAPH module. Tone generation is controll...
Definition: ussSwLibAppDebug.c:186
MSP remains in LPM2 power mode until timer expires.
Definition: ussSwLib.h:928
Interrupt for SDHS Data Overflow.
Definition: ussSwLib.h:855
enum _USS_Capture_Gain_Range_ USS_Capture_Gain_Range
Selects Programmable Gain Amplifier (PGA) range.
USS_message_code USS_stopUltrasonicMeasurement(USS_SW_Library_configuration *config, USS_stop_measurement_state stopMeasurementState)
The following API can be used to stop any active USS capture. The user has the option to select USS s...
Definition: ussSwLibMeasurement.c:167
Interrupt for SDHS Over Input Level.
Definition: ussSwLib.h:857
USS_message_code USS_updateSAPHConfiguration(USS_SW_Library_configuration *config)
The following function updates the SAPH module configuration based on user defined USS_Measurement_Co...
Definition: ussSwLibConfiguration.c:216
uint16_t additionalPatternLength
Length of additional binary pattern the length.
Definition: ussSwLib.h:1803
USS_SDHS_Interrupt
Selects appropiate USS SDHS interrupt (Used to register interrupt callback functions) ...
Definition: ussSwLib.h:853
Configure PGA range to 9.0 dB.
Definition: ussSwLib.h:721
int16_t windowLowThreshold
Definition: ussSwLib.h:1498
enum _USS_Trigger_Configuration_Trigger_ USS_Trigger_Configuration_Trigger
Selects USS trigger option.
struct _USS_Alg_temperature_Calculation_Object_ USS_Alg_temperature_Calculation_Object
Contain temperature lookup table data.
Definition: ussSwLib.h:381
Interrupt for SDHS Start conversion Trigger.
Definition: ussSwLib.h:859
USS calibration message codes.
Definition: ussSwLib.h:453
Configure PGA range to 1.0 dB.
Definition: ussSwLib.h:701
USS_diagnostics_mode diagMode
Used to USS SW Library diagnostic mode.
Definition: ussSwLib.h:1145
_USS_HSPLL_input_clock_type_
Selects USS HSPLL input clock Type.
Definition: ussSwLib.h:808
USS_dtof_volume_flow_calculation_interval dtofVolInterval
Definition: ussSwLib.h:1715
struct _USS_Measurement_Configuration_ USS_Measurement_Configuration
Contains USS SW Lib Measurement Configuration.
MSP remains in LPM1 power mode until timer expires.
Definition: ussSwLib.h:926
enum _USS_measurement_pulse_generation_mode_ USS_measurement_pulse_generation_mode
Lists pulse generation options.
USS_measurement_drive_strength ch1DriveStrength
Definition: ussSwLib.h:1294
int32_t iq16M0
specifies m0 constant
Definition: ussSwLib.h:1038
USS_message_code USS_setTemperature(float temperature, USS_Algorithms_Results_fixed_point *results)
The following API updates the fixed point temperature.
Definition: ussSwLibTemperature.c:125
uint8_t windowingMode
Definition: ussSwLib.h:1613
Definition: ussSwLib.h:1561
Value 177 - Indicates signal gain calibration completed successfully.
Definition: ussSwLib.h:468
Definition: ussSwLib.h:586
uint16_t maxCapture
Specifies the maximum capture size.
Definition: ussSwLib.h:1523
USS_HSPLL_output_clk_freq pllOutputFreq
Definition: ussSwLib.h:1377
Value 137 - This error is returned if there was a correlation interpolation error.
Definition: ussSwLib.h:433
This structure is passed to USS_verifyHSPLLFrequency API and test result will be returned using this ...
Definition: ussSwLib.h:1458
Value 174 - Indicates an error during DCO calibration routine.
Definition: ussSwLib.h:459
Configure PGA range to 4.4 dB.
Definition: ussSwLib.h:709
struct _USS_Trigger_Configuration_ USS_Trigger_Configuration
Contains USS SW Lib Trigger Configuration.
Definition: ussSwLib.h:538
int16_t * pCapturesBuffer
then numberOfAcquisitions = 4.
Definition: ussSwLib.h:1510
Configure PGA range to 17.2 dB.
Definition: ussSwLib.h:741
uint_least16_t turnOnADCCount
Definition: ussSwLib.h:1305
USS goes to OFF state.
Definition: ussSwLib.h:536
USS_Alg_volume_Flow_Temperature_Calib_Object * flowTempCalibObject
Definition: ussSwLib.h:1831
Contains USS SW Lib HSPLL Configuration.
Definition: ussSwLib.h:1373
Definition: ussSwLib.h:784
Configure PGA range to 10.7 dB.
Definition: ussSwLib.h:725
struct _USS_calibration_hspll_results_ USS_calibration_hspll_results
This structure is passed to USS_verifyHSPLLFrequency API and test result will be returned using this ...
struct _USS_Pulse_Additional_End_of_Sequence_Configuration_ USS_Pulse_Additional_End_of_Sequence_Configuration
Structure to configure additional multi tone pulse generation.
Configure PGA range to 13.9 dB.
Definition: ussSwLib.h:733
Configure PGA range to 18.2 dB.
Definition: ussSwLib.h:743
Value 21 - This error is returned if input frequency for HSPLL module is invalid. ...
Definition: ussSwLib.h:308
USS_message_code USS_updateAdditionalCaptureDelay(USS_SW_Library_configuration *config, float additionalCaptureDelay)
This function allows users to update Additional Capture Delay with with minimal algorithm reconfigura...
float dnsAbsToFOffset
Definition: ussSwLib.h:1443
uint16_t numOfTrillcycles
En e-pulse followed by an x-pulse sequence is considered a trill cycle.
Definition: ussSwLib.h:1152
uint8_t colNum
Used internally to track flow column.
Definition: ussSwLib.h:1091
USS_message_code USS_computeTemperature(USS_SW_Library_configuration *config, USS_Algorithms_Results_fixed_point *results)
The following API computes temperature using UPS and DNS AbsToF.
Definition: ussSwLibTemperature.c:62
uint16_t maxBinaryPatternLenght
Definition: ussSwLib.h:1795
Contains USS SW Lib Algorithms User Configuration.
Definition: ussSwLib.h:1588
Value 24 - This error is returned if HSPLL detects pll has unlocked.
Definition: ussSwLib.h:314
enum _USS_Alg_temperature_Calculation_Option_ USS_Alg_temperature_Calculation_Option
Enumerated type for temperature calculation.
struct _USS_absTOF_channel_status_object_ USS_absTOF_channel_status_object
Structure containing absTOF channel status object.
Select this option if USS Crystal is 8 MHz.
Definition: ussSwLib.h:802
Configure PGA range to 2.6 dB.
Definition: ussSwLib.h:705
Definition: ussSwLib.h:583
USS_Pulse_Configuration * pulseConfig
Definition: ussSwLib.h:1295
enum _USS_message_code_ USS_message_code
The following enumeration contain all possible USS SW Library return message codes.
float ratioOfTrackLobeToPeak
The ratio of side lobe closest to threshold and peak lobe amplitudes.
Definition: ussSwLib.h:1609
int16_t * pAccCaptureBuffer
(sampleSize*numberOfAcquisitions * 2) bytes and 32 bit aligned.
Definition: ussSwLib.h:1528
float crossThreshold
Threshold for tracking crossing point of envelope relative to envelope maximum.
Definition: ussSwLib.h:1782
USS_absTOF_channel_status_object UPS
Definition: ussSwLib.h:1582
USS_measurement_drive_strength ch0DriveStrength
Definition: ussSwLib.h:1293
enum _USS_absTOF_state_t_ USS_absTOF_state_t
Enumerated type for selection absTOF state.
uint16_t filterLength
This parameter is used to specify the filter length.
Definition: ussSwLib.h:1762
Value 9 - This error is returned if restartCaptureCount is invalid.
Definition: ussSwLib.h:286
Contain Flow Temperature VFR calibration object.
Definition: ussSwLib.h:1071
USS_message_code USS_calibrateVFRFlowTemperature(USS_SW_Library_configuration *config, USS_Algorithms_Results_fixed_point *results)
The following API calibrates Volume Flow Rate using flow and temperature.
Definition: ussSwLibVFRCalibFlowTemperature.c:421
USS_System_Configuration * systemConfig
Pointer to USS_System_Configuration struct.
Definition: ussSwLib.h:1888
Definition: ussSwLib.h:514
Calculates absTOF using Hilbert method.
Definition: ussSwLib.h:986
USS_Algorithms_User_Configuration * algorithmsConfig
Pointer to USS_Algorithms_Configuration struct.
Definition: ussSwLib.h:1900
enum _USS_Alg_volume_flow_Calculation_Option_ USS_Alg_volume_flow_Calculation_Option
Enumerated type for volume flow rate algorithm selection.
uint16_t sampleSize
Definition: ussSwLib.h:1476
Contains USS SW Lib Trigger Configuration.
Definition: ussSwLib.h:1536
USS HSPLL output frequency of 74 MHz.
Definition: ussSwLib.h:833
Definition: ussSwLib.h:513
Select this option if HSPLL input clock is a high accuracy crystal.
Definition: ussSwLib.h:810
Interrupt for Power Request Ignored.
Definition: ussSwLib.h:889
USS_message_code USS_configureUltrasonicMeasurement(USS_SW_Library_configuration *config)
The following API configures USS module based on user configuration files "ussSwLib_userConfig.c" and "ussSwLib_userConfig.h". This API will internally invoke all USS Configuration APIs. In addition, this API will initialize the timer which will be used to generate delays such as the delay to stabilize PLL XTAL.
Definition: ussSwLibMeasurement.c:28
enum _USS_measurement_pause_state_ USS_measurement_pause_state
Allows user to select pause state. Pause state is considered to be time before and after USS Channel ...
Configure PGA range to 6.8 dB.
Definition: ussSwLib.h:715
Calculate absTOF using lobe wide method.
Definition: ussSwLib.h:988
This error is returned if a data error is triggered during sequence.
Definition: ussSwLib.h:360
USS_message_code USS_swapAlgorithmsCaptureBuffers(USS_SW_Library_configuration *config)
This function allows user to swap capture buffers. It is highly recommended to call this function aft...
USS HSPLL output frequency of 71 MHz.
Definition: ussSwLib.h:839
enum _USS_test_channel_ USS_test_channel
Selects USS channel to be used for test (Used for Application Debug API)
struct _USS_dTof_absTof_offset_results_ USS_dTof_absTof_offset_results
This structure is passed to USS_calculateOffsets API and calibration test result will be returned in ...
enum _USS_Alg_AbsToF_Calculation_Option_ USS_Alg_AbsToF_Calculation_Option
Enumerated type for absTOF algorithm selection.
uint8_t * USS_getAlgorithmObjPtr(void)
The following API allows to obtain the address where the library algorithm object is stored...
float acousticLength
Acoustic length in usec at room temperature.
Definition: ussSwLib.h:1280
uint16_t hilbertTransformCoeffsLength
Length of hilbert coefficients.
Definition: ussSwLib.h:1776
Configure PGA range to 28.9 dB.
Definition: ussSwLib.h:771
The following structure allows user to specify single and dual tone configuration.
Definition: ussSwLib.h:1216
Value 173 - Indicates an error during Gain calibration routine.
Definition: ussSwLib.h:457
float volumeAddlScaleFactor
Definition: ussSwLib.h:1276
USS_message_code messageCode
Definition: ussSwLib.h:1847
Interrupt for Time Mark F time out.
Definition: ussSwLib.h:877
Interrupt for UUPS Power Up Time Out.
Definition: ussSwLib.h:891
_USS_HSPLL_input_clock_freq_
Selects USS Crystal Frequency.
Definition: ussSwLib.h:798
_USS_Alg_dToF_Calculation_Option_
Enumerated type for dToF algorithm selection.
Definition: ussSwLib.h:996
uint32_t expectedResult
Definition: ussSwLib.h:1460
The mux charge pump remains OFF during the firing/capture sequence.
Definition: ussSwLib.h:623
Interrupt for PLL Unlock.
Definition: ussSwLib.h:902
int32_t iq16VolumeFlowRateNoCalib
(only used for VFR calibration)
Definition: ussSwLib.h:1876
struct _USS_Algorithms_Quad_Meter_Constant_ USS_Algorithms_Quad_Meter_Constant
Contain quadrilateral meter constants for flow + temperature VFR calibration.
USS_message_code USS_scaleVolumeFlowRate(USS_SW_Library_configuration *config, USS_Algorithms_Results *results)
The following API scales Volume Flow Rate by the additional scale factor.
Definition: ussSwLibVFRCalib.c:35
uint8_t numPulsesBeforeThreshold
The number of pulses/cycles before selected threshold value.
Definition: ussSwLib.h:1611
uint16_t origNumOfThrillCycles
Definition: ussSwLib.h:1165
Calculates absTOF using lobe method.
Definition: ussSwLib.h:984
enum _USS_HSPLL_output_clk_freq_ USS_HSPLL_output_clk_freq
Selects USS HSPLL output clock frequency.
Configure PGA range to 15.5 dB.
Definition: ussSwLib.h:737
uint16_t * pRAMDMAConfigArray
Definition: ussSwLib.h:1206
struct _USS_Alg_volume_Flow_Calib_Object_ USS_Alg_volume_Flow_Calib_Object
Contain Flow VFR calibration object.
Value 178 - Indicates a timeout occurred during DAC calibration.
Definition: ussSwLib.h:470
Configures SDHS Over Sample Rate to 40.
Definition: ussSwLib.h:671
void USS_unregisterUUPSInterruptCallback(USS_UUPS_Interrupt interruptNum)
The following API unregisters a function callback to the desired UUPS interrupt vector.
Definition: ussSwLibISR.c:132
Configure PGA range to 19.6 dB.
Definition: ussSwLib.h:747
Value 63 - This error is returned if a USS power up error is detected.
Definition: ussSwLib.h:353
int32_t * pNvMemBuffer
Definition: ussSwLib.h:1723
int16_t * filterCoeffs
Definition: ussSwLib.h:1764
int16_t * pLEAMemBuffer2
Definition: ussSwLib.h:1769
uint16_t startRxEnCount
Definition: ussSwLib.h:1366
Value 64- This error is returned if a USS power down error is detected.
Definition: ussSwLib.h:355
Configure PGA range to 18.8 dB.
Definition: ussSwLib.h:745
Calculate absTOF using hilbert wide method.
Definition: ussSwLib.h:990
Configure PGA range to 3.5 dB.
Definition: ussSwLib.h:707
uint16_t * pXPulsLPerArray
Definition: ussSwLib.h:1194
Value 139 - This error is returned if there was no temperature object initialized.
Definition: ussSwLib.h:437
_USS_diagnostics_mode_
Selects diagnostic mode to be used by the library. For optimal power consumption it is recommended to...
Definition: ussSwLib.h:509
Contain quadrilateral point in flow + temperature VFR calibration.
Definition: ussSwLib.h:1050
Configure PGA range to 13.0 dB.
Definition: ussSwLib.h:731
MSP remains in LPM3 power mode until timer expires.
Definition: ussSwLib.h:930
Configure PGA range to -6.5 dB.
Definition: ussSwLib.h:683
struct _USS_Pulse_Multitone_Configuration_ USS_Pulse_Multitone_Configuration
structure to configure multi tone pulse generation
_USS_dcOffEst_Calc_Mode_
Selects the UPS/DNS DC offset estimation mode used by USS_estimateDCoffset API.
Definition: ussSwLib.h:955
int16_t calibratedDCOffsetDNS
Definition: ussSwLib.h:1709
Definition: ussSwLib.h:998
float totalTOF_DNS
Downstream total Time Of Flight calculation result.
Definition: ussSwLib.h:1852
USS_message_code USS_setAbsTOFStatus(USS_SW_Library_configuration *config, USS_absTOF_status_object *status)
This function allows users to update the internal AbsTOF status. Including the state and index for th...
struct _USS_Interrupt_Configuration_ USS_Interrupt_Configuration
Contains USS SW Lib Capture Configuration.
Select USS Channel 0.
Definition: ussSwLib.h:645
USS channel remains in high impedance state.
Definition: ussSwLib.h:557
_USS_measurement_pause_state_
Allows user to select pause state. Pause state is considered to be time before and after USS Channel ...
Definition: ussSwLib.h:555
USS_Algorithms_Quad_Meter_Constant * pQuadMeterConstants
Pointer to USS_Algorithms_Quad_Meter_Constant array.
Definition: ussSwLib.h:1073
struct _USS_HSPLL_Configuration_ USS_HSPLL_Configuration
Contains USS SW Lib HSPLL Configuration.
enum _USS_measurement_mux_charge_pump_ USS_measurement_mux_charge_pump
The following parameter allow application to turn on/off the PGA input multiplexer during the whole f...
_USS_measurement_pulse_generation_mode_
Lists pulse generation options.
Definition: ussSwLib.h:630
USS_measurement_mux_charge_pump muxChargePumpMode
Allows user to control multiplexer charge pump during capture.
Definition: ussSwLib.h:1364
Generate a multi tone pulse.
Definition: ussSwLib.h:636
struct _USS_SW_Library_configuration_ USS_SW_Library_configuration
Contains USS SW Lib configuration.
Contain Flow VFR calibration object.
Definition: ussSwLib.h:1023
bool enableWindowLoComp
true = enables Window Comparator, false = disables Window Comparator
Definition: ussSwLib.h:1491
enum _USS_HSPLL_input_clock_freq_ USS_HSPLL_input_clock_freq
Selects USS Crystal Frequency.
struct _USS_Pulse_Configuration_ USS_Pulse_Configuration
Allows user to specify the pulse configuration.
_USS_Capture_Gain_Range_
Selects Programmable Gain Amplifier (PGA) range.
Definition: ussSwLib.h:681
void USS_registerUUPSInterruptCallback(USS_UUPS_Interrupt interruptNum, void function(void))
The following API registers a function callback to the desired UUPS interrupt vector.
Definition: ussSwLibISR.c:114
_USS_measurement_drive_strength_
Allows user to select USS channel drive strength. User can select between max strength and pre-trimme...
Definition: ussSwLib.h:544
struct _USS_System_Configuration_ USS_System_Configuration
Contains USS SW Lib System Configuration.
USS_measurement_end_of_sequence_state eofSequenceState
Definition: ussSwLib.h:1292
Structure containing absTOF channel status object.
Definition: ussSwLib.h:1569
USS HSPLL output frequency of 70 MHz.
Definition: ussSwLib.h:841
This structure is passed to USS_calculateOffsets API and define the test calibration configuration...
Definition: ussSwLib.h:1406
USS_message_code messageCode
Definition: ussSwLib.h:1867
Configure PGA range to 28.1 dB.
Definition: ussSwLib.h:769
Value 8 - This error is returned if startADCsamplingCount is invalid.
Definition: ussSwLib.h:284
uint32_t mCLKFrequency
System Clock (MCLK) Frequency in Hz.
Definition: ussSwLib.h:1131
volatile uint16_t USSSWLIB_USS_measurementPeriod
The following variable is used to reload the measurement timer period.
Definition: USS_Lib_HAL.c:155
_USS_low_power_mode_option_
Selects the desired power mode while USS capture is done.
Definition: ussSwLib.h:921
Contain quadrilateral meter constants for flow + temperature VFR calibration.
Definition: ussSwLib.h:1036
uint16_t searchLobeSampleSteps
Definition: ussSwLib.h:1688
USS_message_code USS_updateSDHSConfiguration(USS_SW_Library_configuration *config)
The following function updates the SDHS module configuration based on user defined USS_Capture_Config...
Definition: ussSwLibConfiguration.c:20
Structure containing absTOF status object.
Definition: ussSwLib.h:1581
Generates a 1200 Ohms bias impedance.
Definition: ussSwLib.h:606
uint16_t maxAdditionalBinaryPatternLength
Definition: ussSwLib.h:1805
float temperature
Temperature calculation result.
Definition: ussSwLib.h:1859
_USS_Alg_volume_flow_Calibration_Option_
Enumerated type for volume flow rate calibration algorithm selection.
Definition: ussSwLib.h:1121
Definition: ussSwLib.h:500
Value 172 - Indicates an error during DAC calibration routine.
Definition: ussSwLib.h:455
int32_t iq16Offset
delta time of flight calibration constant
Definition: ussSwLib.h:1017
uint_least16_t captureTimeOutCount
Definition: ussSwLib.h:1345
enum _USS_diagnostics_mode_ USS_diagnostics_mode
Selects diagnostic mode to be used by the library. For optimal power consumption it is recommended to...
int16_t interpCorrectionTableLenght
Definition: ussSwLib.h:1821
Structure to configure additional multi tone pulse generation.
Definition: ussSwLib.h:1150
_USS_Capture_Calibration_
Selects Programmable Gain Amplifier (PGA) range.
Definition: ussSwLib.h:781
enum _USS_Capture_Calibration_ USS_Capture_Calibration
Selects Programmable Gain Amplifier (PGA) range.
enum _USS_measurement_end_of_sequence_state_ USS_measurement_end_of_sequence_state
This is the USS state after capture is done.
USS_Alg_AbsToF_Calculation_Option absToFOption
User selection for Absolute Time of Flight calculation option.
Definition: ussSwLib.h:1767
USS_Capture_Gain_Range gainRange
Configures the internal gain amplifier.
Definition: ussSwLib.h:1487
Definition: ussSwLib.h:589
struct _USS_Alg_volume_Flow_Temperature_Calib_Object_ USS_Alg_volume_Flow_Temperature_Calib_Object
Contain Flow Temperature VFR calibration object.
_USS_measurement_pulse_polarity_
Allows user to select starting pulse state.
Definition: ussSwLib.h:567
uint8_t numOfRanges
Definition: ussSwLib.h:1027
float dcOffset
The constant value calibrated by Zero flow drift (sec)
Definition: ussSwLib.h:1607
int16_t * pAdditionalBinaryPattern
Definition: ussSwLib.h:1799
USS_message_code USS_resetUSSModule(USS_SW_Library_configuration *config, bool reconfigUSSModule)
This function allows application to reset the USS module. It is recommended that this API is used whe...
Definition: ussSwLibConfiguration.c:617
Configure PGA range to 1.9 dB.
Definition: ussSwLib.h:703
Start pulse generation with low pulse.
Definition: ussSwLib.h:571
enum _USS_Capture_Over_Sample_Rate_ USS_Capture_Over_Sample_Rate
Configures SDHS Over Sample Rate Registers modified: SDHS.CTL0.OBR
USS HSPLL output frequency of 75 MHz.
Definition: ussSwLib.h:831
Interrupt for ping transmit done.
Definition: ussSwLib.h:881
Contains USS SW Lib Capture Configuration.
Definition: ussSwLib.h:1543
USS HSPLL output frequency of 76 MHz.
Definition: ussSwLib.h:829
uint8_t numOfF1Cycles
Definition: ussSwLib.h:1224
uint16_t * pNumOfEPulsArray
Definition: ussSwLib.h:1180
Configure PGA range to 0.1 dB.
Definition: ussSwLib.h:699
uint16_t ussXTALsettlingCount
Definition: ussSwLib.h:1391
_USS_measurement_mux_charge_pump_
The following parameter allow application to turn on/off the PGA input multiplexer during the whole f...
Definition: ussSwLib.h:619
USS ISTOP messages.
Definition: ussSwLib.h:448
uint8_t winPeakIndex2EdgeNumCycles
Definition: ussSwLib.h:1699
Configure PGA range to 25.0 dB.
Definition: ussSwLib.h:761
Configure PGA range to 20.5 dB.
Definition: ussSwLib.h:749
_USS_stop_measurement_state_
Selects USS state after capture has been stopped.
Definition: ussSwLib.h:533
Configure PGA range to 22.0 dB.
Definition: ussSwLib.h:753
USS_highFlow_option highFlowOption
Definition: ussSwLib.h:1726
Value 10 - This error is returned if captureTimeOutCount is invalid.
Definition: ussSwLib.h:288
int32_t thresholdX1X3
Definition: ussSwLib.h:1733
Select this option if USS Crystal is 4 MHz.
Definition: ussSwLib.h:800
Interrupt for sequence acquisition done.
Definition: ussSwLib.h:879
bool enableWindowHiComp
true = enables Window Comparator, false = disables Window Comparator
Definition: ussSwLib.h:1489
uint16_t numOfTestIterations
Definition: ussSwLib.h:1408
int32_t iq16M1
specifies m1 constant
Definition: ussSwLib.h:1040
enum _USS_dtof_volume_flow_calculation_interval_ USS_dtof_volume_flow_calculation_interval
Selects the interval to calculate Delta ToF and Volume Flow.
Value 7 - This error is returned if turnOnADCCount is invalid.
Definition: ussSwLib.h:282
Configures SDHS Over Sample Rate to 80.
Definition: ussSwLib.h:673
USS_message_code USS_calibrateVFRFlow(USS_SW_Library_configuration *config, USS_Algorithms_Results_fixed_point *results)
The following API calibrates Volume Flow Rate using flow (only).
Definition: ussSwLibVFRCalibFlow.c:39
uint16_t * pEPulsLPerArray
Definition: ussSwLib.h:1183
struct _USS_Pulse_Single_Dual_Tone_Configuration_ USS_Pulse_Single_Dual_Tone_Configuration
The following structure allows user to specify single and dual tone configuration.
_iq27 clockRelativeError
Definition: ussSwLib.h:1734
uint8_t numOfFlows
Definition: ussSwLib.h:1077
Contains USS SW Lib Capture Configuration.
Definition: ussSwLib.h:1471
USS goes to POWER OFF state after capture is done.
Definition: ussSwLib.h:657
Configure PGA range to -5.5 dB.
Definition: ussSwLib.h:685
USS_message_code USS_updateDtoFOffset(USS_SW_Library_configuration *config, float dTofOffset)
This function allows users to update Delta Time Of Flight Offset with with minimal algorithm reconfig...
_USS_dtof_volume_flow_calculation_interval_
Selects the interval to calculate Delta ToF and Volume Flow.
Definition: ussSwLib.h:936
Configures SDHS Over Sample Rate to 20.
Definition: ussSwLib.h:669
structure to configure multi tone pulse generation
Definition: ussSwLib.h:1163
enum _USS_capture_power_mode_ USS_capture_power_mode_option
Selects the desired power mode while USS capture is done, API will remain in this mode until capture ...
USS_Trigger_Configuration * triggerConfig
Pointer to USS_Trigger_Configuration struct.
Definition: ussSwLib.h:1898
UUPS messages.
Definition: ussSwLib.h:348
uint32_t F1Frequency
Definition: ussSwLib.h:1241
Configure PGA range to 29.8 dB.
Definition: ussSwLib.h:773
Configure PGA range to 27.7 dB.
Definition: ussSwLib.h:767
USS HSPLL output frequency of 78 MHz.
Definition: ussSwLib.h:825
float volumeFlowRateNoCalib
(only used for VFR calibration)
Definition: ussSwLib.h:1856
Contains USS SW Lib Algorithms Results.
Definition: ussSwLib.h:1865
Value 101 - This error is returned to indicate an ongoing measurement was stopped.
Definition: ussSwLib.h:366
USS_message_code USS_calculateOffsets(USS_SW_Library_configuration *config, USS_dTof_absTof_offset_results *testResults, USS_dTof_absTof_offset_test_config *testConfig)
This API allows the user to estimate the DC offset generated by the SDHS module.
Definition: ussSwLibCalibration.c:556
uint32_t winNumCycles
Definition: ussSwLib.h:1746
int32_t difference
Contains the difference between expected and actualTestCount SAPH.
Definition: ussSwLib.h:1465
enum _USS_HSPLL_input_clock_type_ USS_HSPLL_input_clock_type
Selects USS HSPLL input clock Type.
struct _USS_Algorithms_Quad_Point_ USS_Algorithms_Quad_Point
Contain quadrilateral point in flow + temperature VFR calibration.
USS_message_code USS_runAlgorithmsFixedPoint(USS_SW_Library_configuration *config, USS_Algorithms_Results_fixed_point *results)
The following API calculates Absolute ToF Upstream, Absolute ToF Downstream, Delta ToF...
Generates a 2800 Ohms bias impedance.
Definition: ussSwLib.h:608
struct _USS_dTof_absTof_offset_test_config_ USS_dTof_absTof_offset_test_config
This structure is passed to USS_calculateOffsets API and define the test calibration configuration...
int16_t * hilbertTransformCoeffs
Pointer to hilbert coefficients, coefficients must 32-bit aligned.
Definition: ussSwLib.h:1774
USS_Alg_temperature_Calculation_Option temperatureCalcOption
Specifies Temperature Calculation option.
Definition: ussSwLib.h:1839
USS_message_code USS_testPPGconfiguration(USS_SW_Library_configuration *config, USS_test_channel PPGChannel)
The following API will output current PPG configuration. PPG configuration is controlled via the ...
Definition: ussSwLibAppDebug.c:19
Generate a single tone pulse.
Definition: ussSwLib.h:632
float deltaTOF
Delta Time Of Flight calculation result.
Definition: ussSwLib.h:1848
uint16_t hspllTolerance
Definition: ussSwLib.h:1388
USS_message_code USS_updateHSPLLConfiguration(USS_SW_Library_configuration *config)
The following function updates the HSPLL module configuration based on user defined USS_HSPLL_Configu...
Definition: ussSwLibConfiguration.c:89
Generates a 200 Ohms bias impedance.
Definition: ussSwLib.h:602
USS Algorithms message codes.
Definition: ussSwLib.h:375
Configure PGA range to -4.1 dB.
Definition: ussSwLib.h:689
bool USS_isAlgorithmChannelsSwapped(void)
This function allows users to query current status Algorithm Capture buffers.
Configure PGA range to 9.8 dB.
Definition: ussSwLib.h:723
USS_message_code USS_stopPPGToneGeneration(USS_SW_Library_configuration *config)
The following API will stop the tone generation output in the SAPH module.
Definition: ussSwLibAppDebug.c:247
enum _USS_measurement_bias_impedance_ USS_measurement_bias_impedance
The following parameter allows the application to control the RX/TX bias during the acquisition seque...
uint16_t * pXPulsHPerArray
Definition: ussSwLib.h:1159
bool enableSAPHPingTransmitDoneInterrupt
Definition: ussSwLib.h:1548
int16_t maxSampleShift
Definition: ussSwLib.h:1813
volatile uint32_t USSSWLIB_USS_interrupt_status
The following variable is used to monitor USS interrupt status this variable combines SAPH...
Definition: ussSwLibISR.c:16
_USS_measurement_bias_impedance_
The following parameter allows the application to control the RX/TX bias during the acquisition seque...
Definition: ussSwLib.h:600
USS interrupt message codes.
Definition: ussSwLib.h:442
uint_least16_t restartLowPowerCaptureCount
Definition: ussSwLib.h:1355
Value 22 - This error is returned if the output frequency of the HSPLL is invalid.
Definition: ussSwLib.h:310
Contains USS SW Lib Measurement Configuration.
Definition: ussSwLib.h:1289
_USS_test_channel_
Selects USS channel to be used for test (Used for Application Debug API)
Definition: ussSwLib.h:643
void USS_configAppTimerPeriod(USS_SW_Library_configuration *config, uint16_t count)
The following API can be used to set the application timer period between USS measurements. The API allows to select the desired Low Power Mode. Global interrupts remain enable. The timer clock source for this background delay is ACLK. Therefore the timer period will be determined based on ACLK frequency (e.g. for count = 30 and ACLK freq = 32768 HZ a timer period of ~915 msec will be generated. This API will configure the config->systemConfig->measurementPeriod.
Definition: ussSwLibMeasurement.c:259
USS_Interrupt_Configuration * interruptConfig
Pointer to USS_Interrupt_Configuration struct.
Definition: ussSwLib.h:1902
USS_message_code USS_waitForAppTimerElapse(USS_SW_Library_configuration *config, USS_low_power_mode_option lpmMode)
The following API can be used to wait until the background timer between USS measurements has elapsed...
Definition: ussSwLibMeasurement.c:268
void USS_unregisterSAPHInterruptCallback(USS_SAPH_Interrupt interruptNum)
The following API unregisters a function callback to the desired SAPH interrupt vector.
Definition: ussSwLibISR.c:94
Generates a 600 Ohms bias impedance.
Definition: ussSwLib.h:604
int16_t * pLEAMemBuffer1
Definition: ussSwLib.h:1719
bool enableUUPSPREQIGInterrupt
Definition: ussSwLib.h:1545
USS_Alg_volume_flow_Calibration_Option volumeCalibrationOption
Specifies Volume Flow Rate Calibration option.
Definition: ussSwLib.h:1824
Select this option if HSPLL input clock is a ceramic resonator.
Definition: ussSwLib.h:812
uint16_t * pNumOfXPulsArray
Definition: ussSwLib.h:1157
Value 48 - This error is returned if max sample size is entered.
Definition: ussSwLib.h:343
uint16_t * pEPulsHPerArray
Definition: ussSwLib.h:1156
uint_least16_t startPPGCount
Definition: ussSwLib.h:1296
int32_t iq24transducerConstant
Transducer Length (L) / 2 used to calculate velocity.
Definition: ussSwLib.h:1108
Configure PGA range to 16.3 dB.
Definition: ussSwLib.h:739
USS_message_code USS_estimateDCoffset(USS_SW_Library_configuration *config, USS_dcOffEst_Calc_Mode mode)
This API allows the user to estimate the DC offset generated by the SDHS module.
Definition: ussSwLibCalibration.c:500
Configures SDHS Over Sample Rate to 10.
Definition: ussSwLib.h:667
USS stays in READY state after capture is done.
Definition: ussSwLib.h:659
_USS_message_code_
The following enumeration contain all possible USS SW Library return message codes.
Definition: ussSwLib.h:257
bool outputPLLXtal
Definition: ussSwLib.h:1385
float ADCAdditionalCaptureDelay
Definition: ussSwLib.h:1604
int16_t * pBinaryPattern
Definition: ussSwLib.h:1784
Configure PGA range to -3.3 dB.
Definition: ussSwLib.h:691
USS_HSPLL_Configuration * pllConfiguration
Pointer to USS_HSPLL_Configuration struct.
Definition: ussSwLib.h:1894
SDHS messages.
Definition: ussSwLib.h:327
Select USS Channel 1.
Definition: ussSwLib.h:647
USS HSPLL output frequency of 79 MHz.
Definition: ussSwLib.h:823
Definition: ussSwLib.h:911
uint16_t timerBaseAddress
Definition: ussSwLib.h:1135
uint8_t F2DutyCycle
Definition: ussSwLib.h:1221
USS_Algorithms_Flow_Meter_Constant * pMeterConfiguration
Pointer to USS_Meter_Configuration array.
Definition: ussSwLib.h:1025
USS_measurement_bias_impedance biasImpedance
Allows user to control bias channel bias impedance.
Definition: ussSwLib.h:1362
uint16_t * pEPulsLPerArray
Definition: ussSwLib.h:1155
uint8_t numOfF2Cycles
Definition: ussSwLib.h:1227
© Copyright 1995-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale