Hi,
I have an ADC and a PIT in my project. I need the PIT to trigger the ADC conversions.
If I understand correctly, this needs to be done using the XBAR and ADC_ETC.
But there is no XBAR peripheral in the Peripheral Config Tool. I did add a XBARA to the project and the files fsl_xbara.c and fsl_xbara.h are present in my project.
But the Peripheral Config Tool does not has the XBAR in the list (see screenshot).
Hi Simmania!
The implementation of the XBAR is part of the Pins tool's pin and signal routing. You can use directly the Pins tool to configure your desired state. You can find there inputs and outputs, however the "layers" in between, like XBAR is transparent here.
Alternatively, in the Peripherals tool's "Trigger source" setting you can see the quick-fix light bulb which is a reference to the related Pins tool's setting that needs to be configured. After a right-click on it you can select the desired signal configuration or link to the specified Pins Tool setting.
Best Regards,
Martin Stano
Config Tools Team
Thanks for the answer.
I'm not sure if I understand it 100% now. And I really would like to because the project has still some undefined behavior. So I have some questions.
I want to trigger an ADC with a PIT timer. See the attached screen shots for the ADC and ADC_ETC configurations.
In the ADC_ETC configuration there is this 'XBAR triggers configurations' section. Do I understand correctly that this does not configure the XBAR itself, but selects which XBAR output is used and how this signal is used by the ADC_ETC peripheral?
I selected the 'CH0_XBAR_TRIG,0'. Does this refer to the ADC_ETC_TRIG00 output of the XBAR?
There is the warning 'Signal 0, channel XBAR0_TRIG is not routed'. Does this mean the XBAR is not configured to route a signal to the XBAR_TRIG0 output?
What does the 'Chain configuration' in the XBAR section mean? Are these the actions taken when the ADC_ETC is triggered? Is it fill in correctly (assuming I use ADC12_1 as ADC input)?
For the ADC peripheral I get the warning 'At least one of ADC_ETC hardware triggers needs to be routed'. Is this also because the XBAR is not configured?
Is it correct that I need to manualy make the XBAR connect input Pit Trigger 0 (I use PIT 0) to output ADC_ETC trigger 0?
Like this:
BOARD_ConfigMPU();
BOARD_InitBootPins();
BOARD_InitBootClocks();
BOARD_InitBootPeripherals();
BOARD_InitDebugConsole();
XBARA_Init(XBARA);
XBARA_SetSignalsConnection(XBARA, kXBARA1_InputPitTrigger0, kXBARA1_OutputAdcEtcTrig00);
All I want to accomplish is that PIT 0 triggers the ADC. Did I do it the correct way and can I really ignore the warnings?
The chain configuration is used for selecting multiple ADC input sources for a measurement that is triggered by a configured XBAR trigger.
Hi!
To trigger the ADC with the PIT you can use Pins tool
Hi @simmania,
Indeed, there is no implementation of XBAR on Peripherals Tool as of the current version of ConfigTools. Because of this, the implementation of XBAR will have to be done manually by code.
Sorry for the inconvenience this may cause.
BR,
Edwin.
But then how to fill in the XBAR section of ADC_ETC? See attached picture.
It gives a warning: Signal 0, XBAR0_TRIG is not routed.
This confuses me. Do I have to connect this manually and ignore the warning?
Also, the ADC1 gives a warning. See second picture. The warning is:
At least one of ADC_ENV hardware triggers need to be connected.
Should I also ignore this one??
Hi @simmania,
Yes, you would have to implement this manually. Since it is done manually, you can ignore the error message.
BR,
Edwin.
Sorry for the late reaction. Busy with trying to get rid of undefined behaviour of this project.
If ignoring the warnings, how do I know I connected stuff correctly? When it works it is ok?
The problem is that I get undefined behaviour so now and then and I have no clue why that is happening. All I know is that I have some warnings in the configuration tools. Normally I would not ignore warnings.
So how do I know what I did is correct and is not the source if this undefined behaviour?