Hi Sitara Support Team,
My customer is facing CPSW communication issue.
Here are the status, customer's survey and questions.
=Status=
-Device name: AM3357
-Chip Revision: AM335x ES1.2 [PG2.1]
-RTOS: SYS / BIOS, pdk am335x_1_0_9
-Network configuration: PRU_ICSS x 2 + CPSW x 1
=Failure state=
When it is sending via CPSW Ethernet, the communication is possible at first.
After a while, it can receive but not send.
-Failure state detailes *CPSW_registers.zip
1. Create a send descriptor properly on CPPI_RAM,
In CPSW_STATEAM.TX0_HDP, write the transmission Descriptor to be transmitted.
but it does not start the transmission.
*Only TX0/RX0 is used for transmission and reception
2. When the above issue occurs, CPSW_STATEAM.TX0_CP is shown the value
that is set the last transmission completion interrupt,
and CPSW_STATEAM.TX0_HDP is shown the value that is set
the last transmission request.
3. Since CPDMA.TX_INSTATRAW is also 0, the interrupt signal also doesn't seem to be asserted.
4. Once this non-transmitted mode is started, the transmission complete interrupt
does not set again, and the value of CPSW_STATEAM.TX0_HDP is not cleared to 0.
And the value of CPSW_STATEAM.TX0_CP and CPSW_DMA.TX_INSTAT_RAW do not change.
5. Customer thinks that this isuue is very similar to the following URL.
e2e.ti.com/.../663155
=Customer survey=
When initialized with pdk, the value of the ALE register is set as follows.
‥
CPSW_ALE.PORTCTL0 = 3; // PORT0 Foward
CPSW_ALE.PORTCTL1 = 3; // PORT1 Foward
CPSW_ALE.PORTCTL2 = 3; // PORT2 Foward
CPSW_ALE.PORTCTL3 = 0; // PORT3 Disable
CPSW_ALE.PORTCTL4 = 0; // PORT4 Disable
CPSW_ALE.PORTCTL5 = 0; // PORT5 Disable
With the above settings, the failure is reproduced 100%.
In an environment with 100% reproducibility, if it sets the value of
PORT2: ALE register to 1 (Block) referring to the above URL,
the problem does not seem to occur.
‥
CPSW_ALE.PORTCTL0 = 3; // PORT0 Foward
CPSW_ALE.PORTCTL1 = 3; // PORT1 Foward
CPSW_ALE.PORTCTL2 = 1; // PORT2 Blocked
CPSW_ALE.PORTCTL3 = 0; // PORT3 Disable
CPSW_ALE.PORTCTL4 = 0; // PORT4 Disable
CPSW_ALE.PORTCTL5 = 0; // PORT5 Disable
=Questions
Q1. What is the condition that the transmission is not started
even if the transmission Descriptor to be transmitted is written
to CPSW_STATEAM.TX0_HDP?
Please advise me about the conditions other than those
in the Technical Reference Manual SPRUH73Q: 14.3.1.3.4.3 Host error Interrupt.
Q2. CPDMA.TX_INTMASK_SET value shows 0x3, but it seems that pdk code uses
only TX0. What is the reason for not being 0x01?
For reference, the value of CPDMA.TX_INTMASK_SET of pdk is the following two constants or.
#deine CSL_CPDMA_DMA_INTMASK_SET_HOST_ERR_INT_MASK_MASK 2
#define CSL_CPDMA_DMA_INTMASK_SET_STAT_INT_MASK_MASK 1
Q3. Is there any other function, such as CPSW_ALE.PORTCTL,
that malfunctions if the settings of CPSW #1 and CPSW #2 are the same?
Best regards,
kanae