[En-Nut-Discussion] sam7x + rs485

Alain M. alainm at pobox.com
Fri Oct 26 20:55:01 CEST 2007


The problem with hardware handshake may be that it is buggy. From Errata:
----------
39.3.11.1 USART: CTS in Hardware Handshaking
When Hardware Handshaking is used and if CTS goes low near the end of 
the starting bit, a character can be lost.
Problem Fix/Workaround
CTS must not go low during a time slot occurring between 2 Master Clock 
periods before the starting bit and 16 Master Clock periods after the 
rising edge of the starting bit.
----------
Revision A
39.4.10.1 USART: CTS in Hardware Handshaking
more of the same
----------
And two more UART bugs, all could produce data corruption :( :(

Alain

Szemző András escreveu:
> Hi,
> 
> Thanks for your help, meanwhile I found out that I don't enabled the
> peripherial control of the RTS, it works now.
> 
> For answer to my original post, I was able to add xysslib to ethernut with
> minor tweaking, and it seems working, at least 
> the client sample code.
> 
> For ppp on sam7x. I enabled the ahdlc driver (just avr's skeleton, not
> usable yet) and PPP was successfully compiled in.
> The next task is to write the uart functions in the ahdlc driver. I found on
> sourceforge feature request that maybe
> this task is started (hw handshake), my question is how it's going? :)
> (Maybe the simplest is using sam7x uart with no PDC and hw handshake,
> instead like on avr, controlling it with GPIO.)
> 
> Regards,
> Andras
> 
> -----Original Message-----
> From: en-nut-discussion-bounces at egnite.de
> [mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Mingshu Wang
> Sent: Friday, October 26, 2007 5:31 PM
> To: en-nut-discussion at egnite.de
> Subject: Re: [En-Nut-Discussion] sam7x + rs485 (Szemz? Andr?s)
> 
> Hi Andras,
> 
> To make RS485 mode work, you have to setup the uart mode register in
> rs485 mode and also enable the peripheral control of RTS pin.
> 
> Here is the code I use to set UART0 as RS485 mode.
>     if(NutRegisterDevice(&DEV_UART0,0,0)==-1)
> //open the 485 port
>     {
>         //#ifdef DBG
>         printf("%s Registration failed\n",DEV_UART0_NAME);  
>         //#endif
>     }
> 	outr(PIOA_PDR, 0x8);	
>     reg_value = inr(USART0_BASE + US_MR_OFF);
>     outr(USART0_BASE + US_MR_OFF, reg_value | 0x1);
> 
> Mingshu
> 
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
> 
> 



More information about the En-Nut-Discussion mailing list