2009-01-29 12:24:04     PPI read hangs...

Document created by Aaronwu Employee on Aug 11, 2013
Version 1Show Document
  • View in full screen mode

2009-01-29 12:24:04     PPI read hangs...

Kayoko Hickman (UNITED STATES)

Message: 68522   

 

Hello,

 

I'm using Bluetechnix TCM537.  I want to read from PPI port, but it hangs at read.  I use FS1 as an external sync.

 

 

 

My configurations are

 

ioctl(ppiFD, CMD_PPI_PORT_ENABLE, CFG_PPI_PORT_ENABLE);

 

ioctl(ppiFD, CMD_PPI_PORT_DIRECTION, CFG_PPI_PORT_DIR_RX);

 

ioctl(ppiFD, CMD_PPI_XFR_TYPE, CFG_PPI_XFR_TYPE_NON646);

 

ioctl(ppiFD, CMD_PPI_PORT_CFG, CFG_PPI_PORT_CFG_XSYNC1);

 

ioctl(ppiFD, CMD_PPI_FIELD_SELECT, 0);

 

ioctl(ppiFD, CMD_PPI_PACKING, CFG_PPI_PACK_DISABLE);

 

ioctl(ppiFD, CMD_PPI_SKIPPING, CFG_PPI_SKIP_DISABLE);

 

ioctl(ppiFD, CMD_PPI_DATALEN, CFG_PPI_DATALEN_12);

 

ioctl(ppiFD, CMD_PPI_CLK_EDGE, CFG_PPI_CLK_EDGE_FALL);

 

ioctl(ppiFD, CMD_PPI_TRIG_EDGE, CFG_PPI_TRIG_EDGE_RISE);

 

 

 

I appreciate it very much if you can point me to a right direction.  Thank you.

 

 

 

 

QuoteReplyEditDelete

 

 

2009-01-29 13:34:00     Re: PPI read hangs...

Michael Hennerich (GERMANY)

Message: 68526   

 

I'm currently reworking the bfin_ppi driver,

since it has quite some issues associated.

 

Please take a look at uclinux-dist/user/blkfin-test/ppi-test application, as reference to solve your current problem.

 

You shouldn't use the CFG_PPI_PORT_ENABLE ioctl at all since it is harmful and subject for removal.

 

I will check the updated/fixed driver into our 2008R1 svn release branch once finished, next week.

 

I'm happy about someone doing additional test, and providing feedback.

 

Stay tuned -

 

-Michael

 

QuoteReplyEditDelete

 

 

2009-01-29 14:33:55     Re: PPI read hangs...

Kayoko Hickman (UNITED STATES)

Message: 68533   

 

Thank you very much, Michael.

 

I ran ppitest, and I see no data...  I didn't change the code (ppitest.c) except "/dev/ppi0" to "/dev/ppi".  Is this the known problem, or do I have to do (or not to do) any modification?

 

 

 

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

root:/bin> ppitest slave

fd(3) = open(/dev/ppi)

Enter Line length (default = 16):

16

Enter number of lines (default = 8):

8

beSlave()

new gImageSize( 580004 ) = 0x100 (256)

Setting up slave...to read 256 bytesSlave set up complete...following output is received from master...

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

Nothing is happening after this.......

 

 

 

 

 

I'm a newbee, and since I encountered uClinux, I've been banging my head on the wall :-).

QuoteReplyEditDelete

 

 

2009-02-05 14:41:08     Re: PPI read hangs...

Kayoko Hickman (UNITED STATES)

Message: 68933   

 

Hello,

 

I am still struggling on this issue...  I got new bfin_ppi.c and bfin_ppi.h, and ran ppitest.  It still hangs at read.  I am not sure what I am doing wrong...

 

Also, CMD_PPI_PORT_DIRECTION is out from bfin_ppi.h...  Does PPI know if I'm in TX mode or RX mode?

QuoteReplyEditDelete

 

 

2009-02-05 14:59:19     Re: PPI read hangs...

Michael Hennerich (GERMANY)

Message: 68934   

 

CMD_PPI_PORT_DIRECTION is redundant since the driver know whether you invoke the drivers read or write file operation.

 

Different question do you have a clock source connected to PPI_CLK?

 

Without external supplied clock you won't see anything ....

 

-Michael

QuoteReplyEditDelete

 

 

2009-02-05 15:04:12     Re: PPI read hangs...

Kayoko Hickman (UNITED STATES)

Message: 68935   

 

I see PPI clock at CPLD on the scope.  I will check it at the Blackfin side also.  Thank you!

 

Kayoko

QuoteReplyEditDelete

 

 

2009-02-05 15:52:43     Re: PPI read hangs...

Kayoko Hickman (UNITED STATES)

Message: 68939   

 

Hello agian...  I see PPI_CLK at the Blackfin on the scope, and it's 25MHz as I expected...  Is ppitest supposed to work as is, or do I need to modify some things (other than activating PPI driver in kernel setting)?

 

Kayoko

Attachments

    Outcomes