Part Number:MSP430FR6047
Dear Sir,
Our water meter project is based on CCS project UltrasonicWaterFR6047_01_40_00_01 which uses USSLib_01_40_00_06.
As a start point we used default configuration settings in USS_userConfig.c where
.triggerConfig = USS_Triger_Configuration_Software_Trigger;
and everything goes well.
We also registered some callbacks:
USS_registerSAPHInterruptCallback(USS_SAPH_Interrupt_SEQDN, SeqDoneCallback);
USS_registerSDHSInterruptCallback(USS_SDHS_Interrupt_ACQDONE, AcqDoneCallback);
which are invoked from library also.
But when we changed USSLib setting to start measurement from TA0 CCR2:
.triggerConfig =USS_Triger_Configuration_External_Trigger1;
then we met next problems:
1. We found that USS Xtal is not started after calling USSLibGUIApp_Init so we added next code:
HspllUssInitParam.oscillatorType = HSPLL_XTAL_GATING_COUNTER_LENGTH_4096;
HspllUssInitParam.xtlOutput = HSPLL_XTAL_OUTPUT_DISABLE;
HspllUssInitParam.oscillatorEnable = HSPLL_XTAL_ENABLE;
HSPLL_xtalInit(HSPLL_BASE, &HspllUssInitParam);
2. Our registered callbacks are note invoked untill we added next code:
SAPH_enableInterrupt(SAPH_BASE, SAPH_ACQUISITION_SEQUENCER_DONE_INTERRUPT);
SDHS_enableInterrupt(SDHS_BASE, SDHS_ACQUISITION_DONE_INTERRUPT);
So we have next questions:
1. Is there another variant of CCS project UltrasonicWaterFR6047_01_40_00_01 which triggers USSLib by TA0 CCR2 or RTC, not by Software?
2. If we trigger USSLib by TA0 CCR2 what else we should configure by ourselves?
3. As we found callback on USS_SDHS_Interrupt_ACQDONE invokes two times on one measurement trigger. Is it because of two measurements in sequence?
.sequenceSelection = USS_measurement_capture_sequence_ch0_ch1;
4. What callback should we use to know that measurements are finished and we can invoke USS_runAlgorithmsFixedPoint function? As for now we use callback on USS_SDHS_Interrupt_ACQDONE.
Thank You very much for You answers.