ENT_QOS EVENT0_IN sync

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ENT_QOS EVENT0_IN sync

2,166 Views
davesi
Contributor I

I am trying to capture an event on the EVENT0_IN input of the ENET_QOS module of the RT1176. I have managed to do this for the ENET_1G module, but apart from the pin config I can find no reference to the EVENT0_IN capture for the QOS module anywhere in the SDK / reference manual or example code.

Is there a way to capture the timestamp of events on this input?

 

0 Kudos
Reply
12 Replies

2,083 Views
graffiti
Contributor II

Hi Edwin,

I am also working on this project and would like to add some more details.

For the ENET_1G, in section 60.3.8.6 of the Reference Manual, we have details (and registers) to perform an input capture to capture the timestamp of an external signal on 1588_EVENT0_IN.

Section 61.3.5 for the ENET_QOS provides no equivalent functionality.

Furthermore, the ENET_QOS register map does not list equivalent register to allow a capture of the EVENT0_IN signal to the ENET_QOS.

If the ENET_QOS has the ability to capture timestamps on EVENT0_IN event, please provide the required register details.

Or are you saying that the same registers exist in the QOS as in the 1G for external event timestamping?

For example, in the 1G the Timer Control Status Registers (TCSR0 - TCSR3) exist and are documented (60.5.1.108)

There is no equivalent register documented for the QOS, although there is a gap in the QOS register address space at 0x608 - 0x624. Are you saying that the same Timer Control registers that the ENET_1G has are also present in the ENET_QOS, but they are undocumented?

 

Thanks, Kieran. 

 

 

0 Kudos
Reply

1,868 Views
davesi
Contributor I

The control registers on the 1G device all read back as 0xffff_ffff on the QOS, if you assume that there are undocumented registers that match the 1G IP on the QOS. I can't use any of the ENET_Ptp1588*() API commands as these all take an ENET_Type, not the ENET_QOS_Type and some take the enet_handle_t, not the enet_qos_handle_t.

I can write to the register locations, but don't see any of the registers changing independently, for example the ATVR register (Timer Value Register) defaults to 0xffff_ffff and never changes.

Is there some documentation on the QOS input event capture that is not in the i.MX RT1170 Processor Reference Manual Rev. 3?

 

0 Kudos
Reply

1,490 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @davesi,

The reason why ENET_QOS does not have an EVENT0_IN anywhere in the RM is because it shares EVENT0_IN input with ENET_1G (as seen on the description of 1588_EVENT_IN of the following table):

Capture.PNG

This is how ENET_QOS can capture timestamping events. Do note that, although the port is the same, the pinmux is different:

1739242339602.png

1739242392236.png

1739242431701.png

 

BR,
Edwin.

 

0 Kudos
Reply

288 Views
graffiti
Contributor II

Hi Edwin, Omar and team,

We are still failing to capture an event on the EVENT0_IN of the ENET_QOS peripheral.

We have the signal routed and the correct pinmux selected.

On the 1G we do the following:

ENET_Ptp1588SetChannelMode(base, kENET_PtpTimerChannel1, kENET_PtpChannelRisingCapture, false);

// timer control status register
#define TCSR_TF (1 << 7) // timer flag : set when input capture occurs

// wait for capture
while (!(TCSR_TF & base->CHANNEL[kENET_PtpTimerChannel1].TCSR))
{
}

// read captured value
uint32_t captureValue = base->CHANNEL[kENET_PtpTimerChannel1].TCCR;

 

and this works great for the ENET_1G.

But on the QOS if we do the same (but casting the ENET_QOS_Type *base to a ENET_Type*) then the  base->CHANNEL[kENET_PtpTimerChannel1].TCSR register (TMODE bits) cannot be written inside ENET_Ptp1588SetChannelMode. The write is performed but reading back the value it is still zero which would seem to imply that the capture mode cannot be set. And then TCSR TF bit is never set, and no capture is performed.

Please can you provide a minimal few lines of code or register actions to enable and capture a signal on the ENET_QOS EVENT0_IN?

Thanks, Kieran.

0 Kudos
Reply

1,841 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @davesi,

I apologize for the late reply. I'm currently investigating this issue with the SDK team, and will let you know their response about this topic as soon as we come to a conclusion about it.

Thank you for your patience.

0 Kudos
Reply

1,865 Views
davesi
Contributor I

Every time I post I get "You just earned a new Responsive badge!" which is a little ironic.

 

0 Kudos
Reply

2,127 Views
davesi
Contributor I

The two devices are completely different. The API used to capture on the ENET_1G won't talk to the ENET_QOS. It doesn't have any of the same register.

0 Kudos
Reply

2,131 Views
davesi
Contributor I

The Ptp1588 functions all take a ENET_Type pointer, but the QOS is an ENET_QOS_Type. The QOS doesn't have any of the control registers relating to the event0_in capture. They aren't the same, they are completely different. The two MACs are completely different architectures.

0 Kudos
Reply

2,111 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @davesi,

I apologize for the confusion. I didn't mean to say that the same handler will work for both EVENT0 inputs. What I meant with my previous reply is that the behavior is the same, just with different pads, and a different selector register, as the "ENET_QOS ENET_1588_EVENT0_IN source select" is located on GPR6 General Purpose Register (GPR6).

BR,
Edwin.

0 Kudos
Reply

1,933 Views
davesi
Contributor I

Hi Edwin

Still no solution to this issue. Is the qos_event0_in actually connected to the QOS Eth device?

I can't find any way to capture the input. I have it working for the 1G device, but that has a completely different IP to the QOS device. The pin is routed to the event input, but I can find no reference to input capture anywhere in the processor manual, the API or the example code.

Please help.

D

0 Kudos
Reply

2,099 Views
davesi
Contributor I

Thanks Edwin. I know how the pin is routed on the pin mux. But I can find no way of using it on the ENET_QOS device. There is no software in the driver code and I can't find anything in the processor reference manual that even refers to the pin in the QOS section.

0 Kudos
Reply

2,149 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @davesi,

The functionality of EVENT0_IN for ENET_QOS should be the same as for ENET_1G, expect with the use of a different pin.

BR,
Edwin.

0 Kudos
Reply