2008-09-17 15:29:52     Adding PPI driver for BF54x

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

2008-09-17 15:29:52     Adding PPI driver for BF54x

Isaac Leung (CANADA)

Message: 62332   

 

We need to have a PPI driver for our custom board based on the BF548/BF547.

 

Scanning the past threads and docs, it seems the current PPI driver is really only for BF532/BF534 and some work needs to be done to get it to work for the BF54x series. (Has anyone done this yet? If so please let me know so we don't duplicate effort). We are using this for an SRAM controller (BF54x is not connected directly to this SRAM) interface.

 

I'm choosing to make a "new" driver based on the old one instead of just modifying the old one because it looks like the changes may not be minor and I don't want to break anything for BF53x. I'm running into a couple of issues:

 

-There are 3 EPPI ports instead of 1 PPI port. I need to use at least EPPI0 and EPPI1. Should I create a separate driver for each port or mess around with the code to somehow handle any and all EPPI? (It seems easier to do the former, but might be more efficient to do the latter, though it would end up very specialized to what we need it to do)

 

- What is the PPI DELAY? The original driver has read/write PPI DELAY but BF54x looks like it has HDELAY and VDELAY. What is the correspondence between the two? (I haven't been able to find mention of it in the Hardware Reference, but I could be blind...). Similarly, what is COUNT vs. HCOUNT & VCOUNT?

 

- The current "cdefBF548.h" appears to only define some of the required functions for EPPI0. Any particular reason they are not implemented for EPPI1, EPPI2? (other than no time to do it yet).

 

 

 

Thanks,

 

Isaac

QuoteReplyEditDelete

 

 

2008-09-17 21:00:39     Re: Adding PPI driver for BF54x

Mike Frysinger (UNITED STATES)

Message: 62349   

 

the BF537 HRM documents the interaction between frame syncs/delays/counts as does the BF54x.  older PPI's really only dealt with lines.  so the BF54x HDELAY/HCOUNT correspond to BF53x DELAY/COUNT.

 

when writing platform drivers like this, you should just forget that certain processors have certain number of PPIs.  the driver concerns itself with a single instance and passes the active PPI state around internally.

QuoteReplyEditDelete

 

 

2008-09-18 05:19:14     Re: Adding PPI driver for BF54x

Michael Hennerich (GERMANY)

Message: 62375   

 

>"The current "cdefBF548.h" appears to only define some of the required functions for EPPI0. Any particular reason they are not implemented for EPPI1, EPPI2? (other than no time to do it yet)."

 

The defines are all there - See cdefBF54x_base.h

 

I would make a driver that handles both or all three EPPIs.

 

>"Similarly, what is COUNT vs. HCOUNT & VCOUNT?"

 

Please see the HRM - maybe check for a newer version. I think the new enhanced functions are pretty well explained.

 

ADSP-BF54x Blackfin® Processor Hardware Reference (Volume 2 of 2)

 

-Michael

QuoteReplyEditDelete

 

 

2008-09-18 10:42:34     Re: Adding PPI driver for BF54x

Isaac Leung (CANADA)

Message: 62387   

 

Aah yes, thanks. My Hardware Reference manual was an older version.

 

Regarding Mike's comment about multiple EPPI's, my hope is that it would work the way you described, much like the simple gpio drivers. Looking at the current bf5xx_ppi.c file, it looks like this might be the case, but in "cdefBF548.h" there appears to be some functions explicitly defined for EPPI0 only (thus my comment why EPPI0 is the only one "implemented). Perhaps I'm understanding this incorrectly...? Or I guess when I rewrite the PPI driver for our own use, I have to check to see which interface is being used and make the appropriate call?

Attachments

    Outcomes