2008-05-21 10:15:23 AD7490 on SPORT of the blackfin stamp: SPORT settings
Tilman Glötzner (GERMANY)
Message: 56093
Hello,
a) I designed a small board that connects a AD7490 to SPORT0/1 of the blackfin stamp (Picture 21 in http://www.analog.com/UploadedFiles/Data_Sheets/AD7490.pdf shows the wiring). The data sheets suggest to set the SPORT Control Register to
TFSW = RFSW = 1, Alternate Framing
INVRFS = INVTFS = 1, Active Low Frame Signal
DTYPE = 00, Right Justify Data
SLEN =1111, 16-Bit Datawords
ISCLK =1, Internal Serial Clock
TFSR =RFSR = 1, Frame Every Word
IRFS = 0
ITFS = 1
Unfortunatelly, I am not able to completely make out these control bits in the blackfin. Here a table containing of what I can map:
AD7490 data sheet Blackfin
============================================
TFSW, RFSW ??
INVRFS and INVTFS SPORTx_TCR1.LTFS and SPORTx_RCR1.LRFS
DTYPE TDTYPE, RDTYPE (Value = 00)
SLEN SPORTx_TCR2.SLEN, SPORTx_RCR2.SLEN
ISCLK SPORTx_TCR1.ITCLK, SPORTx_RCR1.IRCLK
TFSR , RFSR SPORTx_TCR1.TFSR, SPORTx_RCR1.RFSR
IRFS SPORTx_RCR1.IRFS
ITFS SPORTx_TCR1.ITFS
How do I need to set the remaining controls in SPORTx_TCR1, SPORTx_TCR2, SPORTx_RCR1, and SPORTx_RCR2 ?
I assume
SPORTx_TCR2.TRFST = 0
SPORTx_TCR2.TSFSE = 0
SPORTx_RCR2.RRFST= 0
SPORTx_RCR2.RSFSE = 0
SPORTx_RCR1.RLSBIT = 0
SPORTx_TCR1.TLSBIT = 0
About
SPORTx_TCR1.TCKFE,
SPORTx_TCR1.LATFS,
SPORTx_TCR1.DITFS,
SPORTx_RCR1.RCKFE
SPORTx_RCR1.LARFS
I am not really sure
b) Is there sample code availible showing how to set TCR1,TCR2, RCR1, and RCR2 ?
Thanks
Tilman
QuoteReplyEditDelete
2008-05-21 13:44:26 Re: AD7490 on SPORT of the blackfin stamp: SPORT settings
Robin Getz (UNITED STATES)
Message: 56097
Tilman:
What are you actually trying to do? Create a Linux driver for this device?
-Robin
QuoteReplyEditDelete
2008-05-21 15:44:56 Re: AD7490 on SPORT of the blackfin stamp: SPORT settings
Tilman Glötzner (GERMANY)
Message: 56102
Dear Robin
1) Test the hardware: The idea is to write a userspace program for that
2) Eventually write a driver.
Tilman
QuoteReplyEditDelete
2008-05-22 10:53:28 Re: AD7490 on SPORT of the blackfin stamp: SPORT settings
Robin Getz (UNITED STATES)
Message: 56151
Tilman:
You can not access MMRs from userspace. To test the hardware, you will either need to use the generic SPORT char driver, or do your own now.
-Robin