Using XBAR_INOUT for input and output at the same time

Status
Not open for further replies.

Edmund

Member
Hi,

in order to synchronize resets I wanted to use one XBAR_InOut for several signals and put the state with LOGIC_LOW, LOGIC_HIGH for one XBAR_InOut, which is than routed to all the other signals. But it seems that I have to choose if I use any InOut as input or output, but not both at the same time?

Any help on that?

Edmund
 
Sorry I am sort of lost, here? How is it that you want an IO pin to be both Input and Output at the same time?
I know that you can switch their direction as Input or Output using: IOMUXC_GPR_GPR6 or the like.

So maybe if you described more like what settings you are trying to use, like are you mapping these pins IOMUXC stuff?
 
Actually, one pin as input and output would work, but this is not what I want to do.

My problem is that I want to use one signal (not actually at a PIN, but somewhere inside the processor) for several outputs. I hoped to use LOGIC_LOW, LOGIC_HIGH for one input of XBAR and use the output of this XBAR for all the other tasks. This way, all signals should realy be at the same time, which is not the case if I change the signals one after the other.
So
xbar_connect(XBARA1_IN_IOMUX_XBAR_INOUT06, XBARA1_IN_IOMUX_XBAR_INOUT07);
xbar_connect(XBARA1_IN_IOMUX_XBAR_INOUT06, XBARA1_IN_IOMUX_XBAR_INOUT08);
xbar_connect(XBARA1_IN_IOMUX_XBAR_INOUT06, XBARA1_IN_IOMUX_XBAR_INOUT09);
and then
xbar_connect(XBARA1_IN_LOGIC_LOW , XBARA1_IN_IOMUX_XBAR_INOUT06);
xbar_connect(XBARA1_IN_LOGIC_HIGH , XBARA1_IN_IOMUX_XBAR_INOUT06);
This way signals 7,8,9 would be exactly at the same time.
But it seems that I have to choose if XBARA1_IN_IOMUX_XBAR_INOUT06 is an input or an output.

Any clue?

Edmund
 
My problem is that I want to use one signal (not actually at a PIN, but somewhere inside the processor) for several outputs.

What if you use an output from the And-Or-Inverter (AOI) module?

xbar_connect(XBARA1_IN_AOI1_OUT0, XBARA1_IN_IOMUX_XBAR_INOUT07);
xbar_connect(XBARA1_IN_AOI1_OUT0, XBARA1_IN_IOMUX_XBAR_INOUT08);
xbar_connect(XBARA1_IN_AOI1_OUT0, XBARA1_IN_IOMUX_XBAR_INOUT09);

You would have to set the AOI output to the desired value.

I've never used AOI - maybe like this to set to 1:
AOI1_BFCRT010 = 0xFFFF;
AOI1_BFCRT230 = 0xFFFF;
 
Thanks for this hint. Works nice! :)
CCM_CCGR2 |= CCM_CCGR2_XBAR1(CCM_CCGR_ON); //turn clock on for xbara1
//CCM_CCGR3 |= CCM_CCGR3_AOI1(CCM_CCGR_ON);
xbar_connect( XBARA1_IN_AOI1_OUT0, XBARA1_IN_IOMUX_XBAR_INOUT06); //This connects XBAR1_AOI1 to XBAR1_OUT6
IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_04 = 3; // ALT3 connects XBAR1_INOUT6 to T4 Pin 2
IOMUXC_GPR_GPR6 |= IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_6;// direction select for XBAR_INOUT6
}

void loop() {
delay(2);
AOI1_BFCRT010 = 0xFF;
delay(1);
AOI1_BFCRT010 = 0x0;
}

Gives a nice output on Pin 2.
We do not need both registers as it is an "or" between the 4 inputs. So one positive input is enough. I thought that I need to switch on the clock, but it works without.
I haven't tested yet, but this signal XBARA1_IN_AOI1_OUT0 can probably be routed to any other signal on XBARA.
Unfortunately, the LED-pin has no alternate mode from XBARA, which would be nice for testing.

Thanks again

Edmund
 
Status
Not open for further replies.
Back
Top