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.

TSW1400EVM: What does the "Generate_Software_Trigger" function mean in HSDC Pro?

Expert 2985 points
Part Number: TSW1400EVM
Other Parts Discussed in Thread: AWR1243

Hi all,

****************************************************************************************************************************************************************************************

Software settings: DFP mmwave_dfp_00_09_01_06, SDK mmwave_sdk_01_01_00_02, Uniflash uniflash_4.2.1, Radar Studio v1.9.1.0 and HSDC Pro v4.80.

Hardware settings: AWR1243BOOST + DevPack + TSW1400 + PC.

****************************************************************************************************************************************************************************************

I tried to use HSDC Pro example project to capture data from AWR1243. The project is under folder C:\Program Files (x86)\Texas Instruments\High Speed Data Converter Pro\HSDCPro Automation DLL\Manual and Examples\Automation DLL C Example\ADC.

I feel confused about the function "Generate_Software_Trigger" function in this project.

In this project, I set the trigger option as below,

TriggerModeEnable=1;
SoftwareTriggerEnable=1;

Then I call the "Generate_Software_Trigger" function as below,

else if (TriggerModeEnable==1 && SoftwareTriggerEnable==1) //Software Trigger
{
	printf("\n\nGenerate Software Trigger. Press any key to continue...");
	getch();
	printf("\nGenerating Software Trigger...");
	Error_Status = Generate_Software_Trigger(WaitToCheckTrigger,TimeoutInMs);
	printf("\nError Status = %d",Error_Status);
}

After this, the program gets stuck and waits for the trigger coming in 10 secs.

Then I run another program to start the AWR1243 sensor, then ADC in AWR1243 starts to work. And then HSDC Pro project is triggered and capture data and save as .bin.

****************************************************************************************************************************************************************************************

My problem is:

Because after "Generate_Software_Trigger" function the program is frozen for 10 secs, I must to run another program to start the AWR1243 sensor to start the ADC inside.

What I want to do is to start the AWR1243 sensor in the same program of HSDC Pro example project.

But the HSDC Pro example program is frozen, the AWR1243 sensor start function can't be called immediately.

After 10 secs, the HSDC Pro program goes on and then the AWR1243 function can be called. But for now, the HSDC Pro program just shows "no trigger in 10 secs"...

Maybe multi-thread programming can solve this, but it seems too difficult to me...

Why does the program get stuck after "Generate_Software_Trigger" function?

Because although "Generate_Software_Trigger" function generates a trigger to FPGA on TSW1400, it still waits for some other trigger from ADCs? 

Does it just run a while loop to check the trigger status for 10 secs?

I suppose that it's better not to set HSDC Pro frozen when it waits for trigger coming. There must be an interrupt for handling trigger happens.

 

 

Thanks,

Feng

  • Feng,

    See if section 3.1.3.3 of the HSDC Pro User's Guide helps  with your questions. This document can be found under the "High Speed Data Converter Pro" product folder on the TI website.

    Regards,

    Jim

  • Hi Jim,

    I should read the user guide carefully before I post the questions..

    Now it works in the way below:

    1. Set trigger option as external trigger mode, not software trigger mode

    TriggerModeEnable=1; //Enable Trigger - 1; Disable Trigger - 0
    SoftwareTriggerEnable=0; //Hardware Trigger - 0; Software Trigger - 1; Arm On Next Capture Button Press - 0
    ArmOnNextCaptureButtonPress=0; //Hardware Trigger - 0; Software Trigger - 0; Arm On Next Capture Button Press - 1

    2. Then start the AWR1243 sensor and wait for finishing the capture

    retVal = MMWL_sensorStart(deviceMap);
    ...
    ...
    osiSleep(16*framePeriodicity);

    3. Then call Read_DDR_Memory function to transfer data from TSW1400 to PC

    Error_Status = Read_DDR_Memory(WaitToCheckTrigger,TimeoutInMs);

    4. And then save file as .bin

    Thanks for your hint!

    Feng