cancel
Showing results for 
Search instead for 
Did you mean: 

DMAMR->SWR bit problem during using DP83822 instead of LAN8742

G_A.
Associate II

Hello,

I used DP83822 instead of LAN8742 as ethernet phy in our custom pcb. 

I saw some comments that people can use DP83822 with small change on LAN8742 driver which belog to STM HAL Library. But i am not sure if it is possible.

All the settings are tried in development board which has LAN8742 phy and it was working. But when i try my firmware on pcb, the first fault was that DMAMR->SWR bit can not be reset. According to datasheet if clock arrangement can not be arranged properly, this problem is possible to happen.

I am trying to use DP83822 as RMII mode. But 'its register settings for activating 50 Mhz clock for STM32 RMII Ref Clock' should be performed, then DMAMR->SWR bit can be cleared automatically. Otherwise it fall into error.

I close the control of this bit, prevent system from falling into error and then set the DP83822 register. But it does not work.

Do you have an idea? Thanks for in advance.

1 REPLY 1
LCE
Principal

Did you check the DP83822 datasheet how to activate the clock output to the STM32?

Some pull-up / down at some pin maybe? Is that possible at all?

Checked the PHY's crystal?

You could also try setting up MDIO first and try to read / write the PHY's registers.

But I'm not sure what the conditions are for that.