1 Sep 2009 08:24
Ethernet traffic causing loss of bytes on UART
Alex Lindeijer <Alex.L <at> 3D-Perception.com>
2009-09-01 06:24:21 GMT
2009-09-01 06:24:21 GMT
Hi We are running a serial port on 38400 baud and are seeing loss of Rx bytes. When unplugging the ethernet cable we have no problems. We are using a MPC8541, it has a PC16550D programming model for the UART. I see that the driver uses the FIFO and reads until the FIFO is empty. The Ethernet driver is a tsec driver . We encountered similar problems when writing to flash. We got some verification/write errors with Ethernet traffic going. In that case we masked the interrupts while writing to flash. But we don't want to do that when receiving bytes on the serial port of course. Has anybody else encounter such problems? Any hints in were to look? We have been looking into this now for some time and are getting a bit desperate.....;-( Cheers Alex Lindeijer -- -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
Lazy approach!
>> Another hint: Our board runs with an external 25 MHz clock and parameters are such to bring its main clock
to 48 Mhz (done in configtool).
>> Hope this brings you one step further. Regards Robert
Thanks for the additional code Robert.
I chased it through from just taking single shot software triggered samples with no DMA and in the end, just
changing the code from TC2 to TC1 made it work. For some reason just enabling HW triggering and setting it to
TC2 stops the ADC from returning any results. I've not had chance to find out why yet, but I'm not sure which
TC is being used for the system timer. I had assumed it was TC0, but if it is TC2, then this might explain a few things.
I'm slightly confused by a couple of things, perhaps someone who is familiar with the AT91 hal code might be
able to clearup.
In hal/arm/at91/at91sam7s/current/src/at91sam7s_misc.c:
#ifdef CYGBLD_HAL_ARM_AT91_TIMER_TC
/* Enable peripheral clocks for TC 0 and 1 if they are to be used */
HAL_WRITE_UINT32(AT91_PMC+AT91_PMC_PCER,
AT91_PMC_PCER_TC0 |
AT91_PMC_PCER_TC2);
RSS Feed