| |

VerySource

 Forgot password?
 Register
Search
View: 1272|Reply: 4

***Network card driver error: FEC: No PHY device found****

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-11-26 20:30:01
| Show all posts |Read mode
The kid starts UCLINUX on coldfire5272 (do not use DEBUG program, download the kernel to FLASH, and then move it to memory for execution)

As a result, the above error occurred during the initialization of the FEC driver.

There are currently several points of interest:
1. It is always 0xffff when reading the MMFR register. This is an invalid value. Why is this happening? When I used the DEBUG program to download the kernel and run it on the 5329DEMO board, the above error did not appear;

2. Does the DEBUG program (ie BOOTLOEADER) first initialize the FEC, but the kernel code does not do this work, which leads to this error?

Please expert advice, thank you!
Reply

Use magic Report

0

Threads

8

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-11-27 15:00:01
| Show all posts
Has your hardware changed? For example, the address of the register will be different from the original one?

I think this problem shouldn't be too difficult. If it doesn't help, you can compare the code in the bootloader.
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-11-27 23:30:01
| Show all posts
FEC is integrated in the CPU, so the address will not change

After confirming the problem again, the most puzzled part is:

When rewriting the MMFR register, I read the value of the modified register, the result is correct

But after the interrupt, when I read the value of this register again, the lower 16 is FFFF

And the driver happens to treat FFFF as an invalid value, which is really dizzy! ! ! !
Reply

Use magic Report

0

Threads

8

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-11-28 09:00:01
| Show all posts
I don’t have the 5272 spec. I took a rough look at the 5271

During this time the contents
of the MMFR register will be altered as the contents are serially shifted, and will be unpredictable
if read by the user. Once the read management frame operation has completed, the MII interrupt
will be generated. At this time the contents of the MMFR register will match the original value
written except for the DATA field whose contents have been replaced by the value read from the
PHY register.



So if you read the MMFR register at that time, it should not explain anything.

I also have a question, why is there no FEC default driver in the BSP provided by your board supplier?
I think fec in uclinux should be supported very early.
Reply

Use magic Report

0

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-11-28 11:30:01
| Show all posts
I bought the development board, but the seller didn’t know it clearly, let alone the buyer.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list