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.

AM2634: Realtime Control Subsystem: Comparator Window on one input OR

Part Number: AM2634

Hi,

in the technical reference manual TRM of the AM2634 ("SPRUJ17C – MARCH 2022 – REVISED NOVEMBER 2022") it states (section 1.4.4) that a window comparator can be configured for one analog input. However the windowing function itself must it be made externally?

As far as I understand each comparator module has two comparators ('H' & 'L' for high and low) followed by two digital filters. However the "oring" to perform such a windowing function using the outputs of these digital filters how is this being made? In this SysCfg tool I use (1.13.0) for the OUTPUT XBAR section I did configure "CMPSSA0_CTRIPH" or "CMPSSA0_CTRIPL" I can't configure for the "ored" output function of the two digitial filters within one comparator module.

Q: How is this accomplished? What do I miss here or misunderstand?

Any help or hint would be appreciated.

Markus

As an additional information I was able to configure the comparator for a low going output if the input value being digitized is bigger than 3072 with respect to the 12Bit input range from 0..4095. What I would need is an additional level saying it shall go low as well if the digitized value is below a certain level, say less than 1024 for example. This is shown in the scope-shot below. How can I accomplish this?

Channel 1 Yellow Function generator input

Channel 4 green DAC output

Channel 2 Magenta ADC tick pulse 2 MHz

Channel 3 Blue Comparator output but only for values bigger than ...

If for example I use the demo-project from TI "cmpss_asynchronous_trip_am263x-cc_r5fss0-0_nortos_ti-arm-clang" I can configure the high comparator to create a pulse whenever the input signal is higher than the configured value. In the example shown below the DAC value for the high comparator is 3072. We assume an input signal that is using the full scale range from 0..4095. The scope-shot shown below demonstrate it works.

Green is the analog input signal ~0..3Vpkpk.Blue is the comparator output CMPSSA0 on pin R3 whenever the input is higher than the configuration done in the syscfg-tool being 3072. For me it looks like it works. Now adding some more configuration for the comparator submodule CMPSSA0 I do configure the so called lower comparator for a treshhold value of 1024 and invert its output in order to get an additional high going pulse (Blue trace) whenever the input signal (Green) is below this lower value (1024). However nothing alike happens ... ?

Within the output xbar section of the sysfg-tool I add the output of the lower comparator. Running with the addition of the lower comparator and the output XBAR oring function nothing changes. I do get the very same scope-shot as shown above. It looks like the lower comparator has no effect. I may have made a wrong configuration I don't know. The demo program with the modifiction I made is attached.

Any idea what could be wrong?

2626.CMPSS-Config-4-Window-Generator.zip

  • Hi,

    Please expect a delay in the response as it is holiday in India.

    Thanks,
    G Kowshik

  • Okay. Thank you for letting me know,

    br

    Markus

  • Hi Markus

    From the information you have shared, I gather that you need to configure a window comparator.

    I see that you have configured the high comparator, but the low comparator is not working.

    Could you try the below configuration:

    1. Selecting the analog pin to the CMPSS comparator which could work as a window comparator. I see that you are using CMPSS A0, so  I will go ahead using that.

    Here, CMPSS A0 Low comparator has the option to choose ADC0_AIN0 as input along with ADC0_AIN1. We need to choose the ADC0_AIN0 as our input to the positive terminal of the comparator.

    2. Now in the syscfg for the CMPSS A0 --> high comparator, only the DC threshold needs to be configured.

    3. For the CMPSS A0 --> low comparator option --> choose the positive terminal input as INH (ADC0_AIN0)

    Now the DAC values can be configured as required for the Low comparator also.

    Hope this helps

    Thanks & Regards

    Sri Vidya

  • Hi Sri Vidya,

    thank you for your reply. May I ask you which version of the SysCfg tool you are refering to? The graphics attached in your post is kind of low resolution. Therefore I can't recognize it. However in the SysCfg version I use (1.13.0) for the AM2634 the CMPSS section looks the following, and I can't find the settings you mention for the lower comparator 'L'.

    In my understanding for a "window a-like function", the only thing I would need is to configure the two treshhold levels while inverting one of the comparator output and oring the two comparators 'H' and 'L' in order to get this function. Addidionally I use the output of the binary filters in order to smoothen the transistions. That's what I did set. However nothing happens. For me it looks like the comparator 'L' is not reacting at all ...

    br

    Markus

  • Hi Markus

    By default the Low comparator takes INL as input. So I think for you the input is being taken from the INL ADC for low comparator --> ADC0_AIN1. Since there is no signal on that ADC you might not be seeing output as expected.

    Low comparator needs to be configured to use the INH.

    API -- 

    CMPSS_configLowComparator(CONFIG_CMPSS0_BASE_ADDR, CMPSS_INSRC_PIN_INH);

    This bug is fixed in the latest Syscfg and SDK release.

    I request you to use the latest release: 

    SDK -- www.ti.com/.../08.05.00.24

    Syscfg -- www.ti.com/.../1.14.0.2667

    Thanks & Regards

    Sri Vidya

     

  • Hi Sri Vidya,

    thank you for the upated. I did download and install the referenced SDK and the ref. SysCfg-Tool. After trying to re-import the very same example project from the SDK's example section I do get the following error info. This is after a reboot of my machine after the installation of the two packages was done.

    I do use TI-CCS version Version: 11.2.0.00007

    The compiler installed is the version TI C Lang V1.3.1.LTS

    Do I need to upgrade the TI-CCS IDE as well ?

    br

    Markus

  • Hi,

    Finally I was able to get the windowing function using the comparator submodule within the AM2634. Thank you for your help. I did the following to achieve it:

    - Upgrade to the TI C Lang compiler V2.1.2

    - Upgrade the SDK to the version 08.05.00.24

    - Upgrade the SysCfg Tool to the version 1.14.0.2667

    I still use the eclipse based TI-CCS version 11.2.0.00007. Therefore I assume that this is okay.

    You may need to update the preference section within TI-CCS to make th new installations visible to the system. And you may need to update the properties section of the CCS project you are working on to the new available products like compiler, syscfg and the SDK.

    The window-comparator output (Blue trace) goes high whenever the input signal on the ADC0_AIN0 pin (Green) is above or below the treshhold set in the syscfg tool of the sample application based on "cmpss_asynchronous_trip_am263x-cc_r5fss0-0_nortos_ti-arm-clang" from the SDK example section. The two comparator outputs needs to be 'ored' in the GPIO Output Crossbar section as well. The lowever comparator is inverted.

    The sample project based on the TI's example is attached in case someone want to test it. It is for the control-card and you need to manually connect to the pin location R3, since this signal is not on a 100mil connector position available as far as I can tell.

    1884.CMPSS-Config-4-Window-Generator.zip

    br

    Markus