2008-02-23 06:33:16     Change Hitachi TFTdriver from PPI0 to PPI1 with BF651

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

2008-02-23 06:33:16     Change Hitachi TFTdriver from PPI0 to PPI1 with BF651

xabi romero (UNITED STATES)

Message: 51555   

 

I am working with the CM-BF561V2, DEV-Board V2.2 (from Bluetechnix) and the Hitachi TX09D70VM1CDA TFT LCD .

 

The driver (drivers/video/hitachi-tx09.c ) works with the PPI0 port and i need to change the driver to the PPI1 port and change some timers, because working iwith the Dev-Board, some pins of the PPI0 are used in the IPS1362 USB Host chip and  in the LAN911 Ethernet chip.

 

I do the following changes in the driver file:

 

#define PPI0_16 {P_PPI0_CLK, P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3, \

 

P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7, P_PPI0_D8, P_PPI0_D9, P_PPI0_D10, \

 

P_PPI0_D11, P_PPI0_D12, P_PPI0_D13, P_PPI0_D14, P_PPI0_D15, 0}----> the PPI0_xxx to PPI1_XXX

 

<tr class="vc_row_odd" id="l70"> <tr class="vc_row_odd" id="l71"> <tr class="vc_row_odd" id="l72"> <tr class="vc_row_odd" id="l73"> <tr class="vc_row_odd" id="l74"> <tr class="vc_row_odd" id="l75"> <tr class="vc_row_odd" id="l76"> <tr class="vc_row_odd" id="l77"> <tr class="vc_row_odd" id="l78"> <tr class="vc_row_odd" id="l79"> <tr class="vc_row_odd" id="l80"> <tr class="vc_row_odd" id="l81"> <tr class="vc_row_odd" id="l82">

70 :                 #ifdef CONFIG_BFIN561_BLUETECHNIX_CM

71 :                 

72 :                 #define TIMER_DCLK 6   ------> changed to  4

73 :                 #define TIMER_HSYNC 8 ------> changed to 10 (PPI1_Sync1)

74 :                 #define TIMER_DTMG 9 --------> changed to 11 (PPI1_Sync2)

75 :                 #define TIMER_VSYNC 1 ------> changed to 2

76 :                 #define TIMER_BACKLIGHT 5 ---> don´t change

77 :                 #define PCI_PIN GPIO_PF0 -----> change to GPIO_PF9

78 :                 #define TIMERS {P_TMR1, P_TMR5, P_TMR6, P_TMR8, P_TMR9, 0}

79 :                 #define WRITE_PPI_CONTROL(x) bfin_write_PPI0_CONTROL(x)

80 :                 #define READ_PPI_CONTROL bfin_read_PPI0_CONTROL

81 :                 #define WRITE_PPI_DELAY(x) bfin_write_PPI0_DELAY(x)

82 :                 #define WRITE_PPI_COUNT(x) bfin_write_PPI0_COUNT(x)

 

Line 78: changed do TIMER (P_TMR2, P_TMR4, P_TMR5, P_TMR10, P_TMR11, 0)

 

Line 79: bfin_write_PPI0_CONTROL(x)  changed to bfin_write_PPI1_CONTROL(x)

 

Line 80: bfin_read_PPI0_CONTROL  changed to bfin_read_PPI1_CONTROL

 

Line 81: bfin_write_PPI0_DELAY(x) changed to bfin_write_PPI1_DELAY(x)

 

Line 82: bfin_write_PPI0_COUNT(x) changed to bfin_write_PPI1_COUNT(x)

 

Also, in all the file, the reference to the DMA channel 0 (CH_PPI) is changed to CH_PPI1:

 

set_dma_x_count(CH_PPI, 240);  to set_dma_xcount(CH_PPI1........

 

The timer 4 is connected with the PPI1_CLK pin and with the TFT DCLK pin too. When the driver stars, all the synchro pins, data pins, works ok, but the VSYNC pin does not work ok (i put 60 Hz for the VSync and it does not work fine and the frequency is variable).

 

If i change the VSYNC timer the problem is the same.

 

And finally, if i connect the DCLK timer to the PPI0_CLK pin too, the VSYNC timer stars working ok.

 

Could anybody explain me this? i am doing something wrong?

 

thanks

 

-Xabi

 

 

QuoteReplyEditDelete

 

 

2008-02-25 12:46:01     Re: Change Hitachi TFTdriver from PPI0 to PPI1 with BF651

Michael Hennerich (GERMANY)

Message: 51600   

 

Xabier,

 

 

 

 

 

Have a look at the TIMERx_CONFIG Register TIN_SEL bit.

 

 

 

This may explain what you are seeing please consult the Blackfin Hardware reference manual.

 

 

 

 

 

-Michael

 

 

 

QuoteReplyEditDelete

 

 

2008-02-26 02:43:02     Re: Change Hitachi TFTdriver from PPI0 to PPI1 with BF651

xabi romero (UNITED STATES)

Message: 51647   

 

Looking in the ADSP-BF561 Blackfin Processor hardware Manual i can see that the TIN_SEL bit is to select the timer input (I know that before), and does not explain if it is only for use with the PPI0_CLK or you can select the  PPI1_CLK to work.

 

Can we work with the PPI1_CLK usin the TIN_SEL?

 

thanks

 

-Xabi

QuoteReplyEditDelete

 

 

2008-02-26 03:41:25     Re: Change Hitachi TFTdriver from PPI0 to PPI1 with BF651

Michael Hennerich (GERMANY)

Message: 51650    BF561 has 2 PPIs....

 

PPI0 uses / multiplexes TMR8/PPI0FS1 (HSYNC) and TMR9/PPI0FS2(VSYNC).

 

PPI1 uses / multiplexes TMR10/PPI1FS1 (HSYNC) and TMR11/PPI1FS2(VSYNC).

 

You have to use these timers accordingly. If you set TIN=PPI_CLK for TMR10 and TMR11 it uses PPI1_CLK.

 

-Michael

QuoteReplyEditDelete

 

 

2008-02-26 04:00:21     Re: Change Hitachi TFTdriver from PPI0 to PPI1 with BF651

xabi romero (UNITED STATES)

Message: 51651   

 

I know that, but i have problem with the VSYNC timer (when i work with the PPI1). The TMR10 and TMR11 works OK, and i connect the timer 4 (DCLK) with the PPI1_CLK pin.

 

I put like VSYNC timer, the timer 2, and when the driver starts working, the timer´s 2 frequency is not correct (i fixed the VSYNC frequency to 60 Hz), is changing . If i connect the DCLK timer with the PPI0_CLK, then the VSYNC signal is correct.

 

Do you think that is something wrong in the driver for the Hitachi TFT?

 

-Xabi

QuoteReplyEditDelete

 

 

2008-02-26 04:33:11     Re: Change Hitachi TFTdriver from PPI0 to PPI1 with BF651

Michael Hennerich (GERMANY)

Message: 51659    Xabier,

 

The driver in the working case uses TMR2 and sets the TIN=PPI_CLK option, for TMR2

In this case we know that TMR2 uses PPI0_CLK.

 

The other timers TMR0-TMR7 are  also divided  between the two PPIs. Unfortunately I can't tell you how these are distributed between the two PPIs.

The HRM doesn't tell me that.

 

-Michael

QuoteReplyEditDelete

 

 

2008-02-27 05:55:15     Re: Change Hitachi TFTdriver from PPI0 to PPI1 with BF651

xabi romero (UNITED STATES)

Message: 51728   

 

thank you very much Michael.

 

I´ve  changed to the TIMER 6  and the VSYNC signal works OK.

 

Could you tell me where or who can explain to me how are divided the timers between the PPI-s?

 

I think that TImer0 to 3 with the PPI0 and from timer 4 to 7 with the PPI1-

 

Thanks again

 

-Xabi

QuoteReplyEditDelete

 

 

2008-02-27 08:35:53     Re: Change Hitachi TFTdriver from PPI0 to PPI1 with BF651

Michael Hennerich (GERMANY)

Message: 51735    I think your assumption is right.

 

In general - processor.support@analog.com is a good starting point for these processor only related questions.

I will check and let you know.

 

-Michael

QuoteReplyEditDelete

 

 

2008-02-27 12:17:53     Re: Change Hitachi TFTdriver from PPI0 to PPI1 with BF651

Michael Hennerich (GERMANY)

Message: 51747    Xabier,

 

>I think that TImer0 to 3 with the PPI0 and from timer 4 to 7 with the PPI1-

 

I can acknowledge - this is how it works.

We will change the documentation.

 

-Michael

QuoteReplyEditDelete

 

 

2008-02-28 02:55:13     Re: Change Hitachi TFTdriver from PPI0 to PPI1 with BF651

xabi romero (UNITED STATES)

Message: 51761   

 

Ok. Thank you very much

 

-Xabi

Attachments

    Outcomes