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.

DM648 single Phy

We are just moving from the Lyrtech EVM board to our new custom board.  The Ethernet HW is identical, except that we only have a single Phy connected.  I have run the helloWorld example supplied with the NDK, both versions 1.92 and 2.00.  The only modification is to give it a fixed IP address, this works correctly on the EVM.  The output from the custom board is below:


TCP/IP Stack 'Hello World!' Application

Using MAC Address: 3c-2d-b7-40-32-**
cpsw_MDIO_Init
SetPhyMode:000021E1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0
cpsw_MDIO_Init
SetPhyMode:000021E1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0
cpsw_MDIO_FindingState: PhyNum: 0
cpsw_MDIO_FindingState: Timed Out looking for a Phy!
cpsw_MDIO_PhYReset(0)
Enable Phy to negotiate external connection
NWAY Advertising: FullDuplex-1000 FullDuplex-100 HalfDuplex-100 FullDuplex-10 HalfDuplex-10
Network Added: If-1:192.168.1.15

 

I've stared out the last 2 digits on the MAC address.  On the EVM the first bytes of the MAC address are 00-21, why are the above 3c-2d?  The Ethernet switch which the board is connected to shows a link has been achieved, but when pinging the board it comes back unreachable. 

I've seen from several posts that people have had problems with the DM648 hanging after some time running with a single Phy, but we are stuck before that stage.  Can anyone please let me know if we have to modify the NDK to work with a single Phy, or should it auto detect and just work?  If so what changes are required and in which files?

 

Many thanks,

Simon

  • Can you give more detail about what you mean by "hanging"?   Where is the program counter?   Is it in an infinite loop?  Can you look at Kernel/Object View (CCSv3) or ROV (CCSv4) and check the status of task stacks and task states?  

    There's an issue in the DM642 driver where it calls printf() functions from ISR level for some error diagnostics.  Calling printf() from and ISR is not allowed and BIOS will abort.  If you look at LOG_system you would see the reason for the assert().   If you are having this problem, the workaround is to remove the printf() calls from the ISR and replace them with LOG_printf() calls or remove them entirely.

    Regards,
    -Karl-

  • Thanks for the reply, I have only just got access to HW to test with again.

    I have changed the printfs to LOG_printfs and disabled the 2nd prot in csl_emac.h.  Once I set the CPU PLL also I got it working and can now ping the board.

     

    Thanks

  • hello Simon 

    I working on my customized DM648 board , i had few queries if you could share any info it would be highly appreciated .

    1. My customized DM648 board has two phys, and the schematics have been copied from lyrtech. now the pb is that the performance of my board degrades after like 3 to 4 hrs.

        Are u seeing this issue ? can you share info on ur PCB design as in the no of layers and width of board?

    2. secondly have you made the boot loader of your code ? bec i did and the NOR flash was successfully burned but when i power up the board the gets stuck after printing these two lines :

                       TCP/IP Stack 'Hello World!' Application

                       Using MAC Address:

    and when this happens i can not ping or get any sort of response from my board .

    But when i power the board up again it works just fine . Have you face the above mentioned problem , if so can you share any info ... or additional changes you did that my help me . 

    Kindly can you tell me which printf have you changed to LOG_printf ? 

    Waiting for a reply 

    thanx

    Amna

  • Hello Karl

    Can you plz tell me how to remove printf() from ISR ?

    regards

    Amna

  • Hi , I have the same problem . Could you tell me

    1. which printfs did you remve?

    2. how to disable port 2 in csl_emac.c ?

     

    regards,

     

    Clar

  • Firstly Amna, sorry I didn't reply, I only just saw your message.

     

    To disable port 2 I changed CPSW3G_NUM_MAC_PORTS from 2 to 1 in cpsw3g_core.h (NDK 1.92).

     

    All printfs were replaced with LOG_printfs in cpsw_miimdio.c

     

    regards,

    Simon