- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't get working correctly a simple application that reads bytes at 115200 bps under eCos using "hardware serial device driver" (Avalon UART) : I get one byte each two.
However, the (almost) same program works fine with Altera HAL. -> is it possible to use a pure eCos driver to manage Avalon UART instead of the hardware one ? -> what are the TTY mode chan# 0..2 ? Are they mappeable on Avalon UARTs ? If so, how (I can find them with cyg_io_lookup()) ? Thanks in advance ! ++ FredLink Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Fred,
I had something similar to this happening to me. Whilst Rxing at higher Baud rates (including 115200) I would occasionally lose characters. It turned out to be a timer interrupt, of higher priority, occasionally taking longer to complete. If the timer interrupt lasted more than 400uS then that was long enough for the UART to Rx 2 characters, one in the holding register and one in the shift register - anything else has nowhere to go. I fixed the problem by giving the UART a higher priority in the SOPC builder, this didn't cuase any problems, for me, as the UART irq is very fast - just buffers the character into a ring buffer for later processing. Banx.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Banx,
Actually, my system does just nothing for now. It's why I am quite worried about futur with this OS on my system. I've tried with a slower system tick (100 Hz), but it isn't better. Do I have to unmask interrupt or something like that before using this driver ? -- Fred- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by frd66@Jun 13 2006, 02:17 AM thanks banx,
actually, my system does just nothing for now.
it's why i am quite worried about futur with this os on my system.
i've tried with a slower system tick (100 hz), but it isn't better.
do i have to unmask interrupt or something like that before using this driver ?
-- fred
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16147)
--- quote end ---
--- Quote End --- There are two drivers polled and interrupt driven, you should not be manually interfering with interrrupts this should be left to the driver. Without looking at your entire application it's tricky to diagnose the problem, I suggest you follow the instructions to get one of the examples working on a development board, once you have that working then try to build your application on this board, then try your own hardware.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by rugbybloke+jun 13 2006, 12:23 pm--><div class='quotetop'>quote (rugbybloke @ jun 13 2006, 12:23 pm)</div>
--- quote start ---
<!--quotebegin-frd66@Jun 13 2006, 02:17 AM thanks banx,
actually, my system does just nothing for now.
it's why i am quite worried about futur with this os on my system.
i've tried with a slower system tick (100 hz), but it isn't better.
do i have to unmask interrupt or something like that before using this driver ?
-- fred
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16147)
--- quote end ---
--- Quote End --- There are two drivers polled and interrupt driven, you should not be manually interfering with interrrupts this should be left to the driver. Without looking at your entire application it's tricky to diagnose the problem, I suggest you follow the instructions to get one of the examples working on a development board, once you have that working then try to build your application on this board, then try your own hardware. <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16153)</div> [/b] --- Quote End --- That's not so simple ! Of course, I use the interrupt version of driver. Till now, I have the following results : - it works on EP2C35 at 85MHz with Altera HAL - it works on EP2C35 at 85MHz with eCos - it works on our hardware at 20MHz with Altera HAL - it doesn't works on our hardware at 20MHz with eCos Unfortunatly, I'm not good enought to program the PLL (for the SSRAM) as required to make my EP2C35 running at 20 MHz. It would help me to unvestigate the things...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Fred,
Sorry Fred, we've never used eCos (or even HAL) so can't help any further with that. It sounds like your problem isn't the one I suspected - but it would be interesting to see if you get all characters when a slower Baud rate is used. Good luck. Banx.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page