About TJA1103A PHY no strap resistor and software Configure

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

About TJA1103A PHY no strap resistor and software Configure

1,837 Views
Borden
Contributor III

Dear NXP team:

    Our TJA1103 circuit is configured via strap resistors and communicates properly. If there are no strap resistors,Can master/slave, rev-RMII/MII, etc., be configured via software? We used the following code, all registers can be successfully set, but can not communicate. Please help me check where the settings might be incorrect.

Tags (1)
0 Kudos
Reply
4 Replies

1,814 Views
PavelL
NXP Employee
NXP Employee

Hello @Borden ,

yes, you can configure master/slave and other settings by SMI - except the SMI address. Just check if RW is in Access column in the register field description.

At first look, there's nothing suspicious in your Eth_T_InitPhys(void). TJA1103 needs to be in rev-RMII mode to generate clock on TXC - as you already configured.

Why do you delete rows with Siul2_Port_Ip_Init, Clock_Ip_Init ... in your device_init(void) ? Please refer to lwip example related to your MCU (and board).

What S32K3 RTD are you using?

What board and MCU are you using?

Could you share your HW test setup? How do you test communication...

EMAC's clock shall be set like that Solved: RMII clock for S32K3 - NXP Community .

Best regards,

Pavel

1,778 Views
Borden
Contributor III

Thanks! 

IDE: S32DS 3.6.0. S32K3 RTD: 5.0.0. Board:Ourself ECU. HW test setup:ECU and ethernet tester,ping 192.168.0.200 -t. Example:Lwip_baremetal_s32k396 or Lwip_FreeRTOS_s32k396(some pin changed)
The ultimate goal is to eliminate the need for strap resistors in the hardware circuit design by using software configuration.Our test results:

1.During debugging/simulation:

The device can be pingable (ping 192.168.0.200 -t) regardless of whether these strap resistors is open, pulled up, or pulled down.

2.When powered on directly (without simulation), the device can not be pingable.

When using strap resistors (instead of software configuration), communication works normally and the device is pingable in both simulation and actual operation modes.

Tags (1)
0 Kudos
Reply

1,763 Views
PavelL
NXP Employee
NXP Employee

Hello @Borden ,

Let's check your project first:

  • ConfigTools/Clocks  - EMAC's clocks look OK
  • ConfigTools/Pins
    • I believe that ENET0_nRST used in Dio shall be also defined in Pins
    • I usually start a project with Fastest setting
    • emac_mii_rmii_tx_clk shall be defined as Input
  • test.c
    • you may comment lines 628 - 651 to disable time limitation of lwip example
  • device.c
    • there should be delay between Eth_T_InitPhys and Eth_43_GMAC_Init. Based on your description, the missing delay could be an issue.

The background: every peripheral needs to have enabled clock before its initialization. In this case, tx_clk shall be available before gmac_init. Please check that tx_clk is running before gmac_init. That could be the difference between "pin strapping mode" and "software mode".

Best regards,

Pavel

1,727 Views
Borden
Contributor III

Thanks very much! 

0 Kudos
Reply