|From PA1688 to PA6488 - Ethernet PHY Ready?|
| || |
|Nov 20, 2011|
|I have programmed 4 different MACs so far, after power up, all need 1-2 seconds delay before working normally.
As the NE2000 driver in Windows DDK source code also waited 2 seconds, for a long time I believed that silly waiting code was perfectly normal.
About a year ago I even convinced someone who was testing DM9003 that although the chip did have various problems, waiting for 2 seconds before it can be used was not a bug.
PA6488 has built-in MAC, we used a separate PHY chip on the PA648C video compression module board.
Last week I noticed the syslog debug message of PHY linked can always be received.
In this way I can do other network job like DHCP immediately in the interrupt service routine, instead of waiting pointlessly for 2 seconds.
As with AR1688 development, most of the ethernet related improvements had also been updated with PA1688.
However, PA6488 is so different that I can not do the same change back.
As we did not use 93C46 with RTL8019AS, we can not detect the PHY link status.
And although we can detect link status with KSZ8842, which used in AR168MK VoIP module, we did not used any interrupt on the ethernet part,
with the 1 second timer to check link status, it is hard to reduce the overall waiting time.
As PA1688 and AR1688 both have DSP to do voice processing, on the controller part, ethernet handling is the most important job, so we do not use interrupt for ethernet.
With PA6488, the most heavy job now is video processing, and we process all ethernet tasks in interrupt.
Updated on Mar 10, 2015
In 2012 I changed PA6488 ethernet handling from interrupt to normal main loop, in the hope of better cache performance. The detection of link status was also moved in to main loop,
so I can start DHCP as soon as possible. This smart idea can be used on KSZ8842 too, but for some unknown reason, I did not do it at that time.
The ENC28J60 ethernet chip used in PA3288 solution is the 5th ethernet MAC I have programmed.
After I made it worked the same way as the MAC of PA6488, I suddenly realized that I can apply the changes to KSZ8842 too.
Finally after 6 years, I removed the 2 seconds wait in KSZ8842 init process. The result is the 0.63.026 test upgrade file of AR168P IP phone and AR168MT VoIP module.
No comments for this page yet.