This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

66AK2E05: Ethernet not working; PSC not initializing

Part Number: 66AK2E05


We are trying get the Ethernet port working on our custom board, and we are not able to get the Network Coprocessor to successfully initialize.  We are following the sequence in section 2.3.3 of the PSC User’s Guide (SPRUGV4C) to turn on the power domain and clock modules, but the PTSTAT.GOSTAT[X] bit never clears:

The procedure for concurrent power domain/module state transitions follows (X denotes the power domain number, Y denotes the module domain number):

1. Wait for PTSTAT.GOSTAT[X] to clear to 0x0. Wait for any previously initiated transitions to finish before initiating a new transition.

2. Set PDCTL[X].NEXT for an ON (0x1) transition.

3. Set MDCTL[Y].NEXT to Enable (0x3). Note that you may set transitions in multiple MDCTL.NEXT fields in this step as long as the corresponding power domain is on.

4. Set PTCMD.GO[X] 0x1 to initiate the state transition(s). The PSC will turn on the logic / memory for that particular domain, starts the module clock, then de-asserts the module reset.

5. Wait for PTSTAT.GOSTAT[X] to clear to 0x0. The domain is safely in the new state only after PTSTAT.GOSTAT[X] is cleared to 0x0.

 

We ran the same sequence on both our board and the K2E EVM. The K2E EVM completes initialization (PTSTAT.GOSTAT[2] goes to 0), but ours does not. The only known relevant difference between the two boards is that the EVM uses the NETCPCLK for an input clock to the NETCP PLL, and we use the CORECLK at the same frequency. We are at a loss for why this is occurring. We are at a standstill on ideas for what could be the problem. Please make suggestions on steps we can take to figure out what is going wrong!

 

Collected Data:

 

Below is pasted an annotated session from a configuration attempt on our board. The point of failure is highlighted in bold:

?

 

*** Commands ***

w - read 32-bit memory location

W - write 32-bit memory location

? - display menu

 

// Read registers associated with Power and Clock for NETCP control.

> w

32-bit hex address: 02620358 // NETCPPLLCTL0 - NETCP Pll Control Register 0

0x02620358: 0x090804C0

> w

32-bit hex address: 0262035c // NETCPPLLCTL1 - NETCP PLL Control Register 1

0x0262035C: 0x00002040

> w

32-bit hex address: 02350128 // PTSTAT - Status of transition

0x02350128: 0x00000000

 

// Turn on the NETCP power and enable the three clocks

> W

32-bit hex address: 02350308 // Set bit 0 of PDCTL2 - power on

32-bit value to write: 1

0x02350308: 0x00000001

> W

32-bit hex address: 02350a1c // Set bits 4:0 of MDCTL7 to 3 - enable state

32-bit value to write: 103

0x02350A1C: 0x00000103

> W

32-bit hex address: 02350a20 // Set bits 4:0 of MDCTL8 to 3 - enable state

32-bit value to write: 1103

0x02350A20: 0x00001103

> W

32-bit hex address: 02350a24 // Set bits 4:0 of MDCTL9 to 3 - enable state

32-bit value to write: 103

0x02350A24: 0x00000103

> W

32-bit hex address: 02350120 // Set bit 2 to cause NETCP command transition

32-bit value to write: 4

0x02350120: 0x00000004

> w

32-bit hex address: 02350128 // PTSTAT should read 0 for completion of command; 0x4 if not done

0x02350128: 0x00000004

 

// Read registers associated with Power and Clock for NETCP control.

> w

32-bit hex address: 235081c // MDSTAT7 - PA clock status - bits 5:0 should be 0x3

0x0235081C: 0x00000A18

> w

32-bit hex address: 2350820 // MDSTAT8 - Ethernet SGMIIs clock status - bits 5:0 should be 0x3

0x02350820: 0x00000A18

> w

32-bit hex address: 2350824 // MDSTAT9 - SA clock status - bits 5:0 should be 0x3

0x02350824: 0x00000A18

> w

32-bit hex address: 2350208 // PDSTAT2 - NETCP power status - bit 0 should be 1

0x02350208: 0x00000301

 

Below is pasted an annotated session from a similar configuration attempt on the K2E EVM board. The same point that failed on our board is highlighted in bold, except it passes on the EVM. Note that the EVM’s Ethernet port works out of boot, and we take some steps to turn the power domain and clock modules off before running the above initialization sequence to turn them back on:

 

U-Boot 2013.01 (Jun 11 2015 - 10:06:42)

 

I2C:   ready

SPD csum OK; in SPD: 33 CC; computed 00000033 CC

DDR3A Speed will be configured for 1600 Operation.

Detected SO-DIMM [18KSF51272HZ-1G6K2]

DDR3 speed 1600

DRAM: 4 GiB

 

Reseting entire DDR3 memory to 0 ...

DRAM: 2 GiB

NAND: 512 MiB

Net:   K2E_EMAC0, K2E_EMAC1, K2E_EMAC2, K2E_EMAC3, K2E_EMAC4, K2E_EMAC5, K2E_EMAC6, K2E_EMAC7

Hit any key to stop autoboot: 3 2 0

 

K2E EVM # ping 147.24.130.42

Using K2E_EMAC0 device

host 147.24.130.42 is alive

 

// Read ID register to see address base is good.

K2E EVM # md.l 0x2350000 1 // PID register 0x4482 in upper 16 bits, lower unknown

02350000: 44827200   .r.D

 

// Read all registers associated with Power and Clock for NETCP control.

K2E EVM # md.l 0x2350120 // PTCMD   - Command transition

02350120: 00000000   ....

K2E EVM # md.l 0x2350128 // PTSTAT - Status of transition

02350128: 00000000   ....

K2E EVM # md.l 0x2350208 // PDSTAT2 - NETCP power status

02350208: 00000301   ....

K2E EVM # md.l 0x2350308 // PDCTL2 - NETCP power command

02350308: 00000001   ....

K2E EVM # md.l 0x235081c // MDSTAT7 - PA clock status

0235081c: 00001f03   ....

K2E EVM # md.l 0x2350820 // MDSTAT8 - Ethernet SGMIIs clock status

02350820: 00001f03   ....

K2E EVM # md.l 0x2350824 // MDSTAT9 - SA clock status

02350824: 00001f03   ....

K2E EVM # md.l 0x2350a1c // MDCTL7 - PA clock command

02350a1c: 00000103   ....

K2E EVM # md.l 0x2350a20 // MDCTL8 - Ethernet SGMIIs clock command

02350a20: 00001103   ....

K2E EVM # md.l 0x2350a24 // MDCTL9 - SA clock command

02350a24: 00000103   ....

K2E EVM # md.l 0x2620358 // NETCPPLLCTL0 - NETCP Pll Control Register 0

02620358: 090804c0   ....

K2E EVM # md.l 0x262035c // NETCPPLLCTL1 - NETCP PLL Control Register 1

0262035c: 00002040   @ ..

 

// Turn off the three NETCP clocks, then power

K2E EVM # md.l 0x2350128 // PTSTAT should read 0 to start

02350128: 00000000   ....

K2E EVM # mw.l 0x2350a1c 0x100 1 // Clear bits 4:0 of MDCTL7 - SwRstDisable state

K2E EVM # mw.l 0x2350a24 0x100 1 // Clear bits 4:0 of MDCTL7 - SwRstDisable state

K2E EVM # mw.l 0x2350a20 0x1100 1 // Clear bits 4:0 of MDCTL8 - SwRstDisable state

K2E EVM # mw.l 0x2350308 0x0 1 // Clear bit 0 of PDCTL2 - power off

K2E EVM # mw.l 0x2350120 0x4 1 // Set bit 2 to cause NETCP command transition

K2E EVM # md.l 0x2350128 // PTSTAT should read 0 for completion of command; 0x4 if not done

02350128: 00000000   ....

 

// Read all registers associated with Power and Clock for NETCP control.

K2E EVM # md.l 0x2350120 // PTCMD   - Command transition

02350120: 00000000   ....

K2E EVM # md.l 0x2350128 // PTSTAT - Status of transition

02350128: 00000000   ....

K2E EVM # md.l 0x2350208 // PDSTAT2 - NETCP power status - bit 0 should be 0

02350208: 00000200   ....

K2E EVM # md.l 0x2350308 // PDCTL2 - NETCP power command

02350308: 00000000   ....

K2E EVM # md.l 0x235081c // MDSTAT7 - PA clock status - bits 5:0 should be 0

0235081c: 00000a00   ....

K2E EVM # md.l 0x2350820 // MDSTAT8 - Ethernet SGMIIs clock status - bits 5:0 should be 0

02350820: 00000a00   ....

K2E EVM # md.l 0x2350824 // MDSTAT9 - SA clock status - bits 5:0 should be 0

02350824: 00000a00   ....

K2E EVM # md.l 0x2350a1c // MDCTL7 - PA clock command

02350a1c: 00000100   ....

K2E EVM # md.l 0x2350a20 // MDCTL8 - Ethernet SGMIIs clock command

02350a20: 00001100   ....

K2E EVM # md.l 0x2350a24 // MDCTL9 - SA clock command

02350a24: 00000100   ....

K2E EVM # md.l 0x2620358 // NETCPPLLCTL0 - NETCP Pll Control Register 0

02620358: 090804c0   ....

K2E EVM # md.l 0x262035c // NETCPPLLCTL1 - NETCP PLL Control Register 1

0262035c: 00002040   @ ..

 

// Turn on the NETCP power and enable the three clocks

K2E EVM # md.l 0x2350128 // PTSTAT should read 0 to start

02350128: 00000000   ....

K2E EVM # mw.l 0x2350308 0x1 // Set bit 0 of PDCTL2 - power on

K2E EVM # mw.l 0x2350a1c 0x103 // Set bits 4:0 of MDCTL7 to 3 - enable state

K2E EVM # mw.l 0x2350a20 0x1103 // Set bits 4:0 of MDCTL8 to 3 - enable state

K2E EVM # mw.l 0x2350a24 0x103 // Set bits 4:0 of MDCTL9 to 3 - enable state

K2E EVM # mw.l 0x2350120 0x4 // Set bit 2 to cause NETCP command transition

K2E EVM # md.l 0x2350128 // PTSTAT should read 0 for completion of command; 0x4 if not done

02350128: 00000000   ....

 

// Read all registers associated with Power and Clock for NETCP control.

// At this point, the register hopefully should be back to what they were

// originally.

K2E EVM # md.l 0x2350120 // PTCMD   - Command transition

02350120: 00000000   ....

K2E EVM # md.l 0x2350128 // PTSTAT - Status of transition

02350128: 00000000   ....

K2E EVM # md.l 0x2350208 // PDSTAT2 - NETCP power status - bit 0 should be 1

02350208: 00000301   ....

K2E EVM # md.l 0x2350308 // PDCTL2 - NETCP power command

02350308: 00000001   ....

K2E EVM # md.l 0x235081c // MDSTAT7 - PA clock status - bits 5:0 should be 0x3

0235081c: 00001f03   ....

K2E EVM # md.l 0x2350820 // MDSTAT8 - Ethernet SGMIIs clock status - bits 5:0 should be 0x3

02350820: 00001f03   ....

K2E EVM # md.l 0x2350824 // MDSTAT9 - SA clock status - bits 5:0 should be 0x3

02350824: 00001f03   ....

K2E EVM # md.l 0x2350a1c // MDCTL7 - PA clock command

02350a1c: 00000103   ....

K2E EVM # md.l 0x2350a20 // MDCTL8 - Ethernet SGMIIs clock command

02350a20: 00001103   ....

K2E EVM # md.l 0x2350a24 // MDCTL9 - SA clock command

02350a24: 00000103   ....

K2E EVM # md.l 0x2620358 // NETCPPLLCTL0 - NETCP Pll Control Register 0

02620358: 090804c0    ....

K2E EVM # md.l 0x262035c // NETCPPLLCTL1 - NETCP PLL Control Register 1

0262035c: 00002040   @ ..

  • Hi,

    I've notified the factory team. Their feedback will be posted here.

    Best Regards,
    Yordan
  • Hi,

    What SW you used to intialize the Ethernet port? command under U-boot? Does you board work if using GEL in no-boot mode?

    Regards, Eric
  • We used u-boot to initialize the EVM board (U-Boot 2013.01 (Jun 11 2015 - 10:06:42)).  I am unaware of a GEL file for the K2E EVM that initializes the Ethernet port.  If such a thing exists, please send me a link to the information, as it may be useful to understand the process.

    On our custom board we use our own boot assembly source file.

  • Hi,

    For using GEL approach, you need to put the EVM board in no-boot mode. The GEL is under CCS V6 or V7 ccsv7\ccs_base\emulation\boards\evmk2e\gel, starting point is: Global_Default_Setup_Silent().

    Regards, Eric
  • Hi Eric,

    I would like to try running the no-boot mode on both the K2E EVM, as well as our custom board. Then, I would like to run a minimum initialization on both systems to try to enable the NETCP power and clock modules for Ethernet. I think there are gel scripts that may enable me to do that. My questions are:
    1. Is the Global_Default_Setup_Silent() still the correct script to run, and is there any reason I couldn't run it on both boards?
    2. How are the bootmode pins on the K2E processor configured when in "no boot mode" on the EVM? I looked at the schematic, and another IC seems to be selecting some of the boot mode pins based upon the switch settings. I didn't see a "no boot" mode in the datasheet, either. However, I presume I need to configure our custom board bootmode[] pins in the same way. Please confirm.

    Thank you,
    Brad
  • Hi,

    1) Global_Default_Setup_Silent() is the correct script to run. It runs automatically when you connect the K2E A15 or DSP core.

    2) For how to set to no-boot mode, see processors.wiki.ti.com/.../EVMK2E_Hardware_Setup

    Regards, Eric
  • Hi Eric,

    Thanks for the quick response.
    With regards to question 2 in my previous post, I checked out the link and determined that the device is put in "DSP No-Boot" mode. The page at that link indicates the high_value of bootmode is 0x00000000, and the low_value of bootmode is 0x00100001. However, the pin strappings for the boot mode on the chip is just 16 bits. Presumably, the above values are decoded in some way. What I would like to know is how to configure the 16 bootmode pins on the chip, so I can configure my board to "DSP No-Boot" mode. Then, I can run the same gel script on both boards, hopefully. Please confirm.
    I checked the datasheet, but I didn't see a reference to DSP No-Boot mode.

    Best regards,
    Brad
  • Hi,

    See this picture how to set to no-boot little endian mode:

    Regards, Eric

  • Eric,
    I think there was a misunderstanding with my last question, because the response was not applicable.
    When in "No Boot mode", what value shows up on the 16 bootmode pins on the K2E processor? The solution should take the form of a 16-bit value.
    Thank you,
    Brad
  • Brad,

    It is 0x00000000 0x00100001, this BOOTMODE[15:0] pins map to DEVSTAT[16:1] bits of the
    DEVSTAT register.

    Regards, Eric
  • Hi,

    Maybe the Wiki document is not accurate, I just tried a K2E EVM in no-boot mode by fliping all 4-pins in SW1 to ON positions. Below is the GEL output when connecting C66x with on-board XDS200 emulator:

    IcePick_D_0: Warning: A firmware update is recommended for the XDS2xx debug probe. For XDS200 probes, update the firmware using the xds2xx_conf utility found in the .../ccs_base/common/uscif/xds2xx directory of the CCS installation. View the ReadMe.txt file there for instructions. For other XDS2xx variants, follow the manufacturer's instructions for updating the firmware. (Emulation package 6.0.628.3)
    C66xx_0: GEL Output:
    Connecting Target...
    C66xx_0: GEL Output: TCI6636K2E GEL file Ver is 1.29999995
    C66xx_0: GEL Output: Detected PLL bypass enabled: SECCTL[BYPASS] = 0x00800000
    C66xx_0: GEL Output: (2a) MAINPLLCTL1 = 0x00000040
    C66xx_0: GEL Output: (2b) PLLCTL = 0x00000048
    C66xx_0: GEL Output: (2c) PLLCTL = 0x00000048
    C66xx_0: GEL Output: (2d) Delay...
    C66xx_0: GEL Output: (2e) SECCTL = 0x00810000
    C66xx_0: GEL Output: (2f) PLLCTL = 0x0000004A
    C66xx_0: GEL Output: (2g) Delay...
    C66xx_0: GEL Output: (2h) PLLCTL = 0x00000048
    C66xx_0: GEL Output: (4)PLLM[PLLM] = 0x00000013
    C66xx_0: GEL Output: MAINPLLCTL0 = 0x05000000
    C66xx_0: GEL Output: (5) MAINPLLCTL0 = 0x09000000
    C66xx_0: GEL Output: (5) MAINPLLCTL1 = 0x00000040
    C66xx_0: GEL Output: (6) MAINPLLCTL0 = 0x09000000
    C66xx_0: GEL Output: (7) SECCTL = 0x00890000
    C66xx_0: GEL Output: (8a) Delay...
    C66xx_0: GEL Output: PLL1_DIV3 = 0x00008002
    C66xx_0: GEL Output: PLL1_DIV4 = 0x00008004
    C66xx_0: GEL Output: PLL1_DIV7 = 0x00000000
    C66xx_0: GEL Output: (8d/e) Delay...
    C66xx_0: GEL Output: (10) Delay...
    C66xx_0: GEL Output: (12) Delay...
    C66xx_0: GEL Output: (13) SECCTL = 0x00090000
    C66xx_0: GEL Output: (Delay...
    C66xx_0: GEL Output: (Delay...
    C66xx_0: GEL Output: (14) PLLCTL = 0x00000041
    C66xx_0: GEL Output: PLL has been configured (CLKIN * PLLM / PLLD / PLLOD = PLLOUT):
    C66xx_0: GEL Output: PLL has been configured (100.0 MHz * 20 / 1 / 2 = 1000.0 MHz)
    C66xx_0: GEL Output: Power on all PSC modules and DSP domains...
    C66xx_0: GEL Output: Power on all PSC modules and DSP domains... Done.
    C66xx_0: GEL Output: WARNING: SYSCLK is the input to the PA PLL.
    C66xx_0: GEL Output: Completed PA PLL Setup
    C66xx_0: GEL Output: PAPLLCTL0 - before: 0x0x098804C0 after: 0x0x090804C0
    C66xx_0: GEL Output: PAPLLCTL1 - before: 0x0x00000040 after: 0x0x00002040
    C66xx_0: GEL Output: DDR begin
    C66xx_0: GEL Output: XMC setup complete.
    C66xx_0: GEL Output: DDR3 PLL (PLL2) Setup ...
    C66xx_0: GEL Output: DDR3 PLL Setup complete, DDR3A clock now running at 800 MHz.
    C66xx_0: GEL Output: DDR3A initialization complete
    C66xx_0: GEL Output: DDR done
    C66xx_0: GEL Output: Setup PHY begin 1GB
    C66xx_0: GEL Output: Reading MDIO_VERSION_REG.
    C66xx_0: GEL Output: MDIO_VERSION_REG: 0x00070107
    C66xx_0: GEL Output: Staring Setup for PHY: 0
    C66xx_0: GEL Output: Misc register done for PHY: 0
    C66xx_0: GEL Output: Waiting for copper link up for PHY: 0
    C66xx_0: GEL Output: Staring Setup for PHY: 1
    C66xx_0: GEL Output: Misc register done for PHY: 1
    C66xx_0: GEL Output: Waiting for copper link up for PHY: 1
    C66xx_0: GEL Output: Setup PHY done 1GB

    And I looked at DEVSTAT: 0x2620020, it is 0x1. This means little endian. All other fields are 0.

    Regards, Eric
  • 0x00000000 0x00100001 is a 64-bit value, not a 16-bit value. Each number in those hex sequences represents 4-bits. Those values must be decoded in some way to control the 16-bit value that shows up on the chip's BOOTMODE[] pins. I think we still have a misunderstanding communicating about this issue.
    I'm going to try to inspect the DEVSTAT register to see what it says.
  • Please ignore my last post. It overlapped with yours. Your screen log will give the answer when I decode the DEVSTAT register. Thank you for running that test!
    Best Regards,
    Brad