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  [ 2 posts ] 
Author Message
 Post subject: NAND WP
PostPosted: Mon Nov 07, 2011 10:08 pm 
Offline

Joined: Wed Jan 26, 2011 8:49 pm
Posts: 6
We have a custom board based on AT91Sam9g45-EKES and the designers connected the NAND Flash's WPn line to a pin on the MCU instead of just pulling it high.

My question to you, how would I go about hacking SAM-BA so that it pulls the PC9 line high when enabling NAND Flash?


Top
 Profile  
 
 Post subject: Re: NAND WP
PostPosted: Mon Nov 07, 2011 11:50 pm 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
Use TCL_Write_Int to poke arbitrary memory locations, specifically to enable to PIO, pin directions an state. Recompiling the applets is probably more fun than you want.

You could look at how other TCL scripts to this, but here's a rough example :

# Reinitialize AIC
TCL_Write_Int $target(handle) 0xFFFFFFFF $AT91C_AIC_IDCR dummy_err
TCL_Write_Int $target(handle) 0x0 $AT91C_AIC_SVR dummy_err
# Clear AIC source
TCL_Write_Int $target(handle) $AT91C_ID_PIOC $AT91C_AIC_ICCR dummy_err
# Clear current IT on PIOC
# Acknowledge the IT with PIO_ISR
TCL_Read_Int $target(handle) $AT91C_PIOC_ISR dummy_err
# Disable IT DRXD on PIOC
TCL_Write_Int $target(handle) $AT91C_PC16_DRXD $AT91C_PIOC_IDR dummy_err


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 15 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: