OsInitialize() Fails on PHY check

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

OsInitialize() Fails on PHY check

Jump to solution
7,395 Views
ITCO
Contributor III

I'm working on MSC8156ADS board. I've connected UEC0 LAN device in the board to my PC. Followed the instruction in net_demo program, I've configured internet connection on the PC.

When running all cores in CW, the program is stopped after OsInitialize(), and looking further inside, it fails on checking the PHY status register: MIISTAT1 - expected is MII_SR & 0x4 == 4, but actual value receives is MII_SR == 0x7949, which gives MII_SR 9== 0x7949) & 0x4  == 0. This read of status register is done twice, and failed twice as well.

The issue here is that the 'net_demo' project worked already, few weeks ago, and now, it  fails.

I tried to disable and remove the AntiVirus, FireWall, replace the LAN cable, but it didn't help. Also I changed configuration to use UEC1, and no results, and also I checked the board switches, and the are as described in the user guide.

 

Since the code hasn't been changed (it is Freescale demo program), what might cause to this failure?

(I've attached screenshot of the Ethernet controller register values after the failure).

 

Thanks.

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
5,237 Views
ITCO
Contributor III

Hi Daniel,

 

The problem is solved, it was connector-port issue: J8 is UEC0 j11 is UEC1.

 

Thanks,

Itamar

View solution in original post

0 Kudos
Reply
19 Replies
5,237 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi,

 

Assuming you have not changed the net_demo project, I suspect the issue might be cause by:

- you have not configured the PC connection correctly. Maybe you have forgot to set the IP/Sub net mask. You can also try to disconnect your PC from any other networks -- just make a direct connection between ADS and PC.

-you have changed something regarding the switches configuration on the ADS.

 

Best regards,

Daniel

0 Kudos
Reply
5,237 Views
ITCO
Contributor III

Hi,

 

Thanks for the answer. I'll try to add more information relating to your answer:

1. "Assuming you have not changed the net_demo project" -

    I've used the original "net_demo:" project from the CW sub-folder. My CW version is 10.0.1. My PC is Windows XP SP3.

2. "you have not configured the PC" -

    I've configured a LAN connection on PC, using IP/Sub net mask as written in the "net_demo" readme text, i.e., IP address is  10.0.0.100 and sub net mask is: 255.0.0.0. This configuration worked for me few weeks ago!

3. "You can also try to disconnect" -

    I took another Laptop PC, disabled all other LAN/WAN connection it has, I've disabled also the Antiviros and the Windows Firewall, but still the same failure.

4. "you have changed something regarding the switches configuration on the ADS" -

    The first thing I looked for was the switches on ADS, but looking at "MSC8156ADS Hardware Getting Started Guide" document at section 5, the switches looks the same.

 

I also ran this demo with my PC Laptop which has a wireless connection and it worked fine.

 

Do you have additional ideas of what might go wrong here?

 

Thanks,

Itamar

0 Kudos
Reply
5,237 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi again,

 

I've done the tests:

My config is:

-------------------------------------------------------------------------

A: ADS8156 board with the following switches config:

SW1:1-8 - ON

SW2: all ON except 6,7

SW3: all ON except 4

SW4: 1,2,5,6 OFF; 3,4,7,8 ON

SW5: all ON except 1,4

SW6: all ON

SW7: all ON except 7,8

-------------------------------------------------------------------------

Direct ETH cable between J8 and my laptop ETH port. Please notice that my laptop support GETH

-------------------------------------------------------------------------

TCP config as bellow:

 TCP prop

 

 

 After this, when i run the debug launch config for all the 6 cores and click on multicore resume button i was able to run the demo.

The results are:

 Results

 

 

 As i said before, the test was carried out on a PILOT board.

If all the abouve settings are same with yours then i suggest you to double check other libraries/linker files/headers/sources that the demo is using.

Part of the demo is sharing the same files with other. Maybe you have modified some other files for other demos that might affect this one.

 

Hope it helps you.

Best regards,

Daniel

 

 

0 Kudos
Reply
5,238 Views
ITCO
Contributor III

Hi Daniel,

 

The problem is solved, it was connector-port issue: J8 is UEC0 j11 is UEC1.

 

Thanks,

Itamar

0 Kudos
Reply
5,237 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi Itamar,

 

I'm happy for you. Nevertheless, in the 5th post I said J8 conector.:smileywink:

Hope this post will be helpfull for any other user that might face similar issues.

 

See you.

 

Best regards,

Daniel

0 Kudos
Reply
5,237 Views
ITCO
Contributor III

Yes, it was my "blindness" :smileywink:, I was convinced....

0 Kudos
Reply
5,237 Views
ITCO
Contributor III

Hello Daniel,

 

As I wrote on Thursday, I took a "clean" Laptop PC XP + SP2, disabled all other LAN settings,  and then, ran the 'net_demo' again, but it still failed: status from the PHY check is incorrect.

I've attached the LAN settings screenshot and the Ethernet Controller register values after return from OS_Initialize(), so you can ovserve that our settings are the same.

Is there any other data/variables/registers that I could send you to verify?

 

Thanks,

Itamar

0 Kudos
Reply
5,237 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi Itamar,

 

Please have a look over mine ETH settings when the application is stopped at 

status = appInit();

 

 Regs

 

BTW, when you power-on the ADS board, does your PC detects the Local Area connection and speed?

 

I'm not sure what other registers can be checked other than the ones from ETH. I'll ask an dev engineer and I'll came back with an reply.

 

Nevertheless, can you send me you project to run it on my side to check if it is OK? Maybe something wrong happend with your hardware setup.

 

Best regards,

Daniel

 

 

 

0 Kudos
Reply
5,237 Views
ITCO
Contributor III

Hello Daniel,

 

I've installed the latest CW version 10.1.3 and tried to build and run the net_demo project, but the results are the same.

0 Kudos
Reply
5,243 Views
michelle
NXP Pro Support
NXP Pro Support

Ok

 

The SDOS driver normally expects a live ethernet connection to get through osIniitialize, this can be bypassed by adding the following flag:

 

UEC_CFG_FORCE_LINK

 

This will allow passing osInitialize with no network connection on the board.

0 Kudos
Reply
5,243 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi,

 

This morning I've run your project (I did not recompile it -- just run yours elds on mine CW and ADS board) and it runs successfully without any issues.

This proves that the project itself has no issues.

 

Most likely in this case is a hardware/setup problem and we should focus on this.

I discussed this problem with another engineer who is handling this kind of issues and his opinion was that might be a timing related issue.

 

I made some test and I compared the my registers values with yours. I can obtain similar values as yours  (all register are the same except MIIMCON which is 0x1200)only in case I remove the ETH cable after the program is downloaded.

 

I would suggest you to do the following tests:

- try to put a GETH switch in the loop is you have one. The connection would be, ADS-Switch-PC. In this case the network negotiation should take place at reset/program download between the ADS and the switch. So, if this is a timing with your PC ETH card is should be revealed.

-configure the application to work with the UEC1 instead of UEC0. Maybe something bad happened with this port.

-the last option would be to try to modify the project in such way that PHY is not reconfigured by the project at runtime. This is harder and require the net library rebuild.

 

I would try the first 2 options.

 

Best regards,

Daniel

 

 

 

 

0 Kudos
Reply
5,243 Views
ITCO
Contributor III

Daniel,

 

I have a HUB which works in 100Mb. Therefore, I would like to configure the ADS to 100Mb instead of 1000Mb.

I´ve added in the structure 'msc815x_uec_init_params_0', config_flags field, the define UEC_CFG_SPEED_100. The structure looks as follows:

msc815x_uec_init_params_t msc815x_uec_init_params_0 =
{
    UEC_ID0,                    /* UEC ID. */
    0xFEE02000,                    /* Base address of UEC memory map. */
    UEC_IF_RGMII,                /* Ethernet physical interface type. */
    (UEC_DEF_FLAGS | UEC_CFG_SPEED_100 | UEC_CFG_ENABLE_STATISTICS | UEC_CFG_ENABLE_ADDITIONAL_STATISTICS),                /* UEC Configuration flags (UEC_CFG_...). */
    OS_HWI_PRIORITY0,            /* IRQ Priority of UEC interrupts. */
    32,                            /* Maximum Tx BD ring length. */
    16,                            /* Maximum Rx BD ring length. */
    TEST_DATA_SIZE,                /* Maximum buffer length for Rx rings. */
    OS_NUM_OF_CORES*TEST_NUM_OF_CHANNELS,/* Number of Tx BD rings */
    OS_NUM_OF_CORES*TEST_NUM_OF_CHANNELS,/* Number of Rx BD rings */
    UEC_DEF_NUM_OF_THREADS,        /* use default number of threads according to the interface speed */
    UEC_DEF_NUM_OF_THREADS,        /* use default number of threads according to the interface speed */
    TRUE,                        /* filing is done according to MAC destination address */
    NULL,                        /* since file_by_mac_address is TRUE, there is no need for a filter array */
    NULL                        /* Default Ethernet parameters. */
};

Is this enough or should I config something else?

 

Regards,

Itamar

 

0 Kudos
Reply
5,243 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi Itamar,

 

Sorry for delay, but I do not like to confirm things until I test them.

The ADS8156 has two single Marvell ETH PHY 88E1111 transceivers that supports 10/100/1000Mb

You can get details from here: http://www.marvell.com/products/tranceivers/alaska_gigabit_ethernet_transceivers/Alaska_88E1111-002....

 

From hardware point of view you do not have to change anything. The network detection is done automatically.

In fact I test your project with the modification proposed by use above (UEC_CFG_SPEED_100) and it work fine for me in the following configuration:

 

ADS -> 100Mb Switch (3Com) -> PC

The results can be seen in the picture attached.

 

If still not working then I suggest you to try to with another ADS if it's possible. Most likely the board has been damaged and it might need repair.

 

Hope this helps you.

Best regards,

Daniel

 

 

0 Kudos
Reply
5,243 Views
ITCO
Contributor III

Hi,

 

I actually have 2 ADS boards. I´ve made all the test on both, and results are the same.

When I work with 100Mb, there are 2 optionsÑ

1. Don´t change the LAN config setup - it stops at the same location as before.

2. Add the UEC_CFG_SPEED_100 to LAN config setup, as I've suggested, and the program run, but ping displays "request time out.". When I stop the running of all cores I get to a point you can see in the attached JPEG screenshot.

 

Regard,

Itamar

0 Kudos
Reply
5,244 Views
ITCO
Contributor III

Hi Daniel,

 

First I'm happy to hear that the project I've sent you work fine, and I think also that the problem is between ADS to PC.

I've already tried UEC1, but the problem stays the same.

I'll advice my IT manager to follow your 1st suggestion.

 

Regards,

Itamar

0 Kudos
Reply
5,244 Views
ITCO
Contributor III

Hi Daniel,

 

To be on the safe side, I've uninstalled CW and re-installed it again, created new workspace and imported the 'net_demo' project, then I ran it again. Results are the same!

I've attached the following files:

  1. Excel file which contains the Ethernet Controller registers value at the stop point (status - appInit()), I've added your values as well, so you could see easilly the differences.
  2. Jpeg file that contains screenshot of the LAN connection and speed at power-on on ADS.
  3. Attached the net_demo project in ZIP file

Thanks,

Itamar

0 Kudos
Reply
5,244 Views
ITCO
Contributor III

Hi,

 

Your switch configuration is exactly as mine.

The IP address is setupt the same as yours.

The sunet mask is the same.

The default Gateway is not used since it was interfering the wireless connection that we use here, but according to the readme it is 10.0.0.138 (maybe it is just an example). Yet, this field was empty when I tried the "net_demo" successfuly.

I'll try it on Sunday and let you know the results.

 

Itamar

0 Kudos
Reply
5,244 Views
Daniel_Popa
NXP Employee
NXP Employee

Hmmm ... pretty strange.

I assume you have not changed the board in the mean time.

I know we had some issues with "prototype" boards (there's a small label on pcb).

On "pilot" those demos should work without any issues.

 

Let me try it on my side and I will came back with mine setup, maybe this will help us identifying the issue.

 

Best regards,

Daniel

0 Kudos
Reply
5,244 Views
ITCO
Contributor III

Thanks,

I tend to suspect the Antivirus (eventhough I disabled it, maybe some registry key cause to a problem) or Windows updates which happens from wile to while.

I'll try to check with a PC formatted to "clean"  Windows XP Pro with default SP.

 

Itamar

0 Kudos
Reply