Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: AT91SAM9260: Using 9BIT USART mode with PDC
PostPosted: Mon May 11, 2009 10:22 am 
Offline

Joined: Sat Jun 30, 2007 1:18 am
Posts: 20
Location: Belgrade
Hi All!

How can I set the 9th bit or detect if 9th bit is set when transferring data through PDC? USART is configured in MODE9.

Thanks


Top
 Profile  
 
 Post subject: Re: AT91SAM9260: Using 9BIT USART mode with PDC
PostPosted: Wed May 16, 2012 9:45 am 
Offline

Joined: Thu Jul 29, 2010 9:23 am
Posts: 6
Hi,
did you solve it? In Linux?
I just start with this problem, but I think if you set MODE9, the PDC automatically transfer 16 bits.
In user space I use function
Code:
read (port_fd, &a, sizeof (a));

where a is unsigned short. But it some time works and some time doesn't.
Please help me, if you now how.
Thanks


Top
 Profile  
 
 Post subject: Re: AT91SAM9260: Using 9BIT USART mode with PDC
PostPosted: Wed May 16, 2012 2:15 pm 
Offline

Joined: Sat Jun 30, 2007 1:18 am
Posts: 20
Location: Belgrade
Hi!

Well, my post is 3 years old ;) I solved the problem, but I will need a day or two to find how.


Top
 Profile  
 
 Post subject: Re: AT91SAM9260: Using 9BIT USART mode with PDC
PostPosted: Tue Mar 19, 2013 3:15 pm 
Offline

Joined: Mon Mar 18, 2013 9:43 pm
Posts: 6
I faced this same problem of MODE9 causing unpredictable results, and this post from 2006 fixed it for me http://www.at91.com/forum/viewtopic.php/f,15/t,1795/hilit,mode9/

On an AT91SAM9x25 with DMAC Rx on a USART in RS485 mode, this seems to do the trick

mode |= ATMEL_US_MODE9 | ATMEL_US_NBSTOP_1 | ATMEL_US_PAR_NONE;

When the parity was enabled, or the stop bit not explicitly set, or ATMEL_US_CHRL_8 turned on, characters would randomly be dropped or shuffled in order, now everything works smoothly.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: