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: AT91SAM9G45 and external UART SC16C2550B timing
PostPosted: Tue May 24, 2011 5:12 am 
Offline

Joined: Thu Nov 04, 2010 9:50 pm
Posts: 7
Someone could please help me to setup the SMC timers?

www.nxp.com/documents/data_sheet/SC16C2550B.pdf

The master clock is 133 MHz (i.e. 7.5 ns cycles)

I'm trying with that:

static struct sam9_smc_config tms_uart_smc_config = {
.ncs_read_setup = 0,
.nrd_setup = 2,
.ncs_write_setup = 0,
.nwe_setup = 2,

.ncs_read_pulse = 8,
.nrd_pulse = 4,
.ncs_write_pulse = 5,
.nwe_pulse = 3,

.read_cycle = 8,
.write_cycle = 6,

.mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8 | AT91_SMC_BAT_WRITE,
.tdf_cycles = 4,
};

Thanks in advance
BR
Edgard


Top
 Profile  
 
 Post subject: Re: AT91SAM9G45 and external UART SC16C2550B timing
PostPosted: Tue May 24, 2011 9:35 pm 
Offline

Joined: Thu Jan 06, 2011 11:13 am
Posts: 31
Hello,

It's always complicated and/or boring to find these timings!

You don't give us the Vcc value then I will only give you the timing not the number of clock cycles.

I am using name from the atmel datasheet. I don't give you all the values, you cand find them by yourself with the diagrams.

NRD_PULSE = t7w
NCS_RD_SETUP = t6s
NRD_SETUP = t7d
NRD_HOLD is used to respect t9d constraint so I will put 10ns

NWE_PULSE = t13w
NCS_WR_SETUP = t6s
NWE_SETUP = t13w
NWE_HOLD = t16h because of t15d

I don't really know for TDF_CYCLES probably t12h

Concerning the modes I don't know if all settings are ok since I don't have the schematic of your board.

Don't hesitate to increase timings and to reduce them when it's ok. I have encountered some troubles with timing really close to the minimun. It was ok outside Linux with sam-ba for example but I had read errors at linux boot time.

Regards

Ludovic


Top
 Profile  
 
 Post subject: Re: AT91SAM9G45 and external UART SC16C2550B timing
PostPosted: Thu May 26, 2011 6:53 pm 
Offline

Joined: Thu Nov 04, 2010 9:50 pm
Posts: 7
Hi Odulo,

Thanks for your reply. Unfortunately still not working.

I'm working with 3.3V

I did as you said, just did
NWE_SETUP = t13d (I think you mistyped t13w)
and then NWE_HOLD = 15 ns because of t15d

But it still doesn't work.

I really don't know where look for.
I have urgency to solve this. Could you remote work with me? Or point some1 able to to remotely help me?

I have o lot of things working fine with my at91sam9g45-ekes based board...And I just need to make this ext serial and a ext sram to work.

We are willing to pay for the consulting.

Best Regards.


Top
 Profile  
 
 Post subject: Re: AT91SAM9G45 and external UART SC16C2550B timing
PostPosted: Fri May 27, 2011 8:57 am 
Offline

Joined: Thu Jan 06, 2011 11:13 am
Posts: 31
Hi Elima,

Sorry it didn't help you. I don't really know where you can find help, maybe your uart vendor. But are you sure that your problem comes from timings?
I mean I had troubles one time to configure smc for a nand devices but it was not only timings. I don't know if this information can help you but the mtd driver accessing to the nand was doing 8-bits accesses instead of 16-bits accesses. It may not be a problem, the smc may manage this but I don't know why it was not working.

Regards

Ludovic


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: