BRT Community

General Category => Discussion - EVE => Topic started by: durian on September 23, 2021, 09:32:38 PM

Title: BT818 PCLK settings
Post by: durian on September 23, 2021, 09:32:38 PM
I've got a BT818 on a board of mine and I'm seeing some weird things with respect to the PCLK timing.

1)
The REG_PCLK_FREQ register values don't agree with the datasheet when set by CMD_PCLKFREQ. For example, if I request a frequency of 36 MHz, REG_PCLK_FREQ gets set to 0x461. If you were to interpret that according to the data sheet, you'd get a frequency of 36 MHz, but the range (found in bits 10:9) are 10. That implies a range of 80 - 160 MHz. If we repeat the exercise, but with a frequency of 72 MHz, REG_PCLK_FREQ is 0x8c1 which has a range of 00 which is 20 - 40 MHz.

I think the real range bits are found in bits 11:10, not 10:9. But even then, the range for 36 MHz would be 01, which is 40 - 80 MHz. 36 MHz is below that. Similarly, a clock of 72 MHz gives a range value of 10, which is 80 - 160 MHz. 72 MHz is also below that range.

I'm not sure what's going on here, but the datasheet does not seem to agree with the results from CMD_PCLKFREQ.

2)
When I put a scope on the PCLK output, pin 39, I see a clock that is about half what was programmed. Does data get clocked out on both rising and falling edges? And if so, is that standard? I'm running the output of the BT818 into a TFP410 to create an HDMI signal and I think that chip expects only one pixel per clock cycle, not two. Can anyone explain to me what's going on here?

Thanks,
mike
Title: Re: BT818 PCLK settings
Post by: BRT Community on September 30, 2021, 04:58:04 PM
Hello,

We will test this and see what results we obtain and then let you know.

Could you please provide an example of the command you are sending and the return values from the command you receive?

To clarify, what are you passing in for ftarget and rounding and what you get back for factual in cmd_pclkfreq( uint32_t ftarget, int32_t rounding, uint32_t factual );

Best regards

BRT Community
Title: Re: BT818 PCLK settings
Post by: durian on September 30, 2021, 09:45:36 PM
Here's an example:
cmd = 0xffffff6a
ftarget = 0x030047b0 (50350000)
rounding = 0x00000000
result = 0x02faf080 (50000000)
REG_PCLK_FREQ = 0xd93 (bits 11:9 = b110, bits 8:4 = 25, bits 3:0 = 3)

I need to point out that when I designed this board, I was under the impression that I could use the internal clock on the FT818. Either I was looking at the first version of the datasheet that explicitly allows for this or the revised one where it isn't clear (not listed in the 4.2 System Clock section, but allowed for in 4.9.4 Reset and Boot-up Sequence and mentioned as a feature of the chip on the first page of the datasheet). Now I'm stuck with using the internal clock since BT818's are back-ordered and not currently available.

Perhaps this explains why I need to specify a clock frequency twice as large as I really want.

I don't know if it is related, but I'm not getting any output from R[0] - R[7]. It is specifically those pins, not the color red. It I swizzle a red / blue swap, blue is not output instead of red.

mike
Title: Re: BT818 PCLK settings
Post by: BRT Community on October 01, 2021, 05:03:28 PM
Hello Mike,

I have passed on this information to an R&D engineer. I will let you know what they think is causing this issue.

Best regards

BRT Community
Title: Re: BT818 PCLK settings
Post by: Rudolph on October 01, 2021, 05:15:31 PM
We already had this discussion, sort of:
http://www.brtcommunity.com/index.php?topic=272.msg1336#msg1336

My take on this is that something went wrong with the onchip oscillator with the BT817/BT818 so it has been removed from the specification.
Title: Re: BT818 PCLK settings
Post by: durian on October 05, 2021, 11:24:11 PM
The on-chip oscillator's accuracy isn't very good, but it's good enough that I can render at 640x480 if I request double the normal PCLK value. At this point, my bigger concern is the lack of output on the R[0..7] pins. Not being able to display red is rather annoying. I am interested to see what the R&D engineer has to say. I'd really like to get things usable enough that I can develop on my board since it might be a while before the chip supply recovers and I can build a new version.

I don't know if there have been multiple updates to the BT818, but REG_DATESTAMP reports "2019-10-28 2.5.3" on mine.

mike
Title: Re: BT818 PCLK settings
Post by: BRT Community on October 06, 2021, 12:08:46 PM
Hello,

We are still in discussion with the R&D engineer regarding the oscillator/datasheet and will provide a response soon.

On your issue with the display, could you please tell me what display settings you have used for the display registers? The registers are as follows:

#define EVE_DISP_WIDTH 1024 // Active width of LCD display
#define EVE_DISP_HEIGHT 600 // Active height of LCD display
#define EVE_DISP_HCYCLE 1344 // Total number of clocks per line
#define EVE_DISP_HOFFSET 160 // Start of active line
#define EVE_DISP_HSYNC0 0 // Start of horizontal sync pulse
#define EVE_DISP_HSYNC1 100 // End of horizontal sync pulse
#define EVE_DISP_VCYCLE 635 // Total number of lines per screen
#define EVE_DISP_VOFFSET 23 // Start of active screen
#define EVE_DISP_VSYNC0 0 // Start of vertical sync pulse
#define EVE_DISP_VSYNC1 10 // End of vertical sync pulse
#define EVE_DISP_PCLK 1 // Pixel Clock
#define EVE_DISP_SWIZZLE 0 // Define RGB output pins
#define EVE_DISP_PCLKPOL 1 // Define active edge of PCLK
#define EVE_DISP_CSPREAD 0
#define EVE_DISP_DITHER 1

Best regards

BRT Community
Title: Re: BT818 PCLK settings
Post by: durian on October 06, 2021, 05:55:07 PM
Here are the relevant register values (plus a couple extra). Also the requested value I passed to CMD_PCLKFREQ and the factual value it selected.

These are values I read from the registers themselves. The timings are for 640x480 @60Hz, though I had to double the requested frequency to get this.

DATESTAMP: 2019-10-28 2.5.3
requested = 50350000
factual = 50000000
FREQUENCY=72000000
PCLK_POL=0x00000001
PCLK=0x00000001
PCLK_2X=0x00000000
PCLK_FREQ=0x00000d93
pclk freq = 50000000
HCYCLE=800
HSIZE=640
HOFFSET=160
HSYNC0=16
HSYNC1=112
VCYCLE=525
VSIZE=480
VOFFSET=45
VSYNC0=10
VSYNC1=12
SWIZZLE=1
CSPREAD=1
DITHER=1
OUTBITS=0
GPIOX=0000108f
GPIOX_DIR=00008000
Title: Re: BT818 PCLK settings
Post by: durian on October 06, 2021, 10:38:20 PM
I should probably mention another weird thing, in case it is relevant. I only use single mode SPI, not dual or quad. The fastest I can run the SPI clock is 8 MHz. If I try 9 MHz or faster, I get garbled responses from the BT818.

mike
Title: Re: BT818 PCLK settings
Post by: BRT Community on October 07, 2021, 05:13:15 PM
Hello,

A general rule for determining the offset values is to use: HOFFSET < (HCYCLE – HSIZE) and VOFFSET < (VCYCLE – VSIZE).

Additionally, you could try changing CSPREAD from 1 to 0.

Hopefully these adjustments will fix your colour issue.

Best regards

BRT Community
Title: Re: BT818 PCLK settings
Post by: durian on October 07, 2021, 05:58:44 PM
I'm looking at table 4-14 (page 26) of the datasheet and it says HSIZE is the visible part of the line, HOFFSET is the non-visible part and HCYCLE is the total length of the visible and non-visible parts. To me that would imply that HCYCLE = HSIZE + HOFFSET, or

HOFFSET = HCYCLE - HSIZE

not

HOFFSET < HCYCLE - HSIZE

My timings agree with the first equation and they come from the VESA Display Monitor Timing Standard (DMT) document.

But that said, your suggestion to disable CSPREAD worked! If I turn it off, instead of using the default enabled value, I get all the colors, including red.

Despite the other quirks, the chip is now working well enough that I can make some demos.

One more quirk I should mention. CMD_TESTCARD does not work for me. It just erases the screen. I can see that it adds commands to the display list, but I only get a blank screen. Anything I'd had in the display list before calling CMD_TESTCARD is not displayed either.

Thank you for your help,
mike
Title: Re: BT818 PCLK settings
Post by: BRT Community on October 08, 2021, 08:57:20 AM
Hi,

Glad to hear it helped,

Yes, for EVE, you should set your display registers such that:

HOFFSET < (HCYCLE – HSIZE)
VOFFSET < (VCYCLE – VSIZE)

Without this, there can be cases where the swap wont succeed.

Instead of using the CMD_PCLK_FREQ we recommend to set the REG_PCLK_FREQ manually using the table 4-11 in the BT817 datasheet as these are the recommended values for each different PCLK frequency. We will be adding more guidance on this in the datasheet very soon,

Could you advise what your overall command list was to display the test card was?

Best Regards, BRT Community
Title: Re: BT818 PCLK settings
Post by: durian on October 08, 2021, 07:22:33 PM
If I compare the REG_PCLK_FREQ values in table 4-11 to the value set by calling CMD_PCLK_FREQ, I see they are the same. I tested all the values in the table and CMD_PCLK_FREQ gives the same REG_PCLK_FREQ value as shown in the table. So CMD_PCLK_FREQ appears to be behaving correctly if the table is also correct. However, both the table and CMD_PCLK_FREQ conflict with the definition for REG_PCLK_FREQ[10:9] listed immediately above table 4-11. Which is correct: CMD_PCLK_FREQ and table 4-11 or the description of bits REG_PCLK_FREQ[10:9].

Regarding the HOFFSET < (HCYCLE - HSIZE) requirement, what is the recommended procedure when you are retrieving timings from the display over DDC? For example, I have a display that reports a preferred timing of:
    74.25 MHz pixel clock
    1280 active horizontal
    370 total horizontal blanking period
    110 horizontal front porch
    40 horizontal sync
    720 active vertical
    30 total vertical blanking period
    5 vertical front porch
    5 vertical sync

The total number of pixels per frame is (1280 + 370) * (720 + 30) = 1237500
74.25 MHz / 1237500 = 60 frames per second

Looking only at the horizontal part,
    HSIZE = 1280
    HOFFSET = 370
    HSYNC0 = 110
    HSYNC1 = 150

To make HOFFSET < (HCYCLE - HSIZE), I'd have to make
    HCYCLE > 1650 [1280 + 370]
but if I did that, then the timing value of 74.25MHz wouldn't be correct.

This above is just one example, but all the standard VESA timings work the same way. They assume (hactive + hblank) * (vactive + vblank) * framerate = pixel clock. There's no room for extra pixel clock cycles.

What's the preferred way to manipulate the supplied timing values to meet the HOFFSET < (HCYCLE - HSIZE) constraint? Reduce the front porch to 0? Maybe make both front and back porch 0 thus reducing HOFFSET to just the sync duration?

As for the test card, I'm doing:
CMD_DLSTART
CMD_TESTCARD
CMD(DISPLAY())
CMD_SWAP

mike
Title: Re: BT818 PCLK settings
Post by: durian on October 08, 2021, 07:58:04 PM
I made a mistake when I looked at the REG_PCLK_FREQ[10:9] range bits. I applied the PCLK frequency to the range conditions instead of the PLL2 frequency. When I correctly use PLL2, things start to make more sense.

Table 4-11 and CMD_PCLK_FREQ still agree with each other and almost match the range conditions above the table. The only difference is table 4-11 and CMD_PCLK_FREQ set the range in bits REG_PCLK_FREQ[11:10] instead of REG_PCLK_FREQ[10:9].

So now it is just a matter of determining which is correct. Is the range set in bits 11:10 or in bits 10:9? If it is set in bits 11:10, what happens with bit 9?

mike
Title: Re: BT818 PCLK settings
Post by: BRT Community on October 12, 2021, 09:51:56 AM
Hi,

Sorry, we have checked and there is an error in the datasheet, please find the corrections in red below.

The PCLK frequency in EXTSYNC mode can be calculated as:
PLL2 frequency = 12MHz * REG_PCLK_FREQ[9:4]
PCLK frequency = PLL2 frequency / REG_PCLK_FREQ[3:0] / 2
REG_PCLK_FREQ[11:10] is determined by PLL2 frequency range:
00: 20 – 40 MHz
01: 40 – 80 MHz
10: 80 – 160 MHz
11: 160 – 228 MHz

Note that the max PLL2 frequency is 228MHz and so the bits which set this must not be set such that the frequency exceeds this limit.

We are updating the datasheet to
- recommend using the values from the table written to the register instead of using the command to ensure that the values are calculated within limits (these should cover most cases and so can be used directly)
- and to correct this calculation.

Sorry for any inconvenience caused and we will have the document updated as soon as possible,

Best Regards, BRT Community
Title: Re: BT818 PCLK settings
Post by: Rudolph on October 12, 2021, 04:46:54 PM
Quote
We are updating the datasheet to
- recommend using the values from the table written to the register instead of using the command to ensure that the values are calculated within limits (these should cover most cases and so can be used directly)

This makes me curious and I may need to re-check my results but as far as I can tell CMD_PCLKFREQ is working just fine.
With a crystal or resonator CMD_PCLKFREQ is setting up the display-clock correctly and over a wide range as well.
I did an experiment a while ago for which I gradually slowed the pixel clock and the resulting frames per second calculated using REG_FRAMES always was very close to the expected value.

There is an issue with the internal oscillator and now I am wondering if the oscillator is running at only 6MHz instead of 12MHz or if CMD_PCLKFREQ somehow messes up the configuration when the internal oscillator is active.
But then, the internal oscillator is not an valid option for the BT81x anymore anyways since it was removed from the datasheet.
Title: Re: BT818 PCLK settings
Post by: durian on October 12, 2021, 06:34:23 PM
Thanks, I've updated my code to calculate REG_PCLK_FREQ according to the new instructions instead of using CMD_PCLKFREQ.

I still have to calculate the values based on twice my desired PCLK frequency, but perhaps that is because I'm using the internal clock and not the external oscillator.

Can you please comment on the HOFFSET < (HCYCLE - HSIZE) constraint based on my example above. I can't see how it is possible to meet that constraint when you are using VESA timings or timings provided by the display over DDC. When using those timings, HOFFSET = (HCYCLE - HSIZE). HOFFSET is the sum of all blanking pixels and HSIZE is the active pixels. In order for HCYCLE > HOFFSET + HSIZE, there would need to be extra PCLK cycles not assigned to either active or blanking pixels. If you were to arbitrarily increase HCYCLE to more than HOFFSET + HSIZE, you would also need a PCLK frequency higher than the one in the VESA timings.

I did experiment with increasing HCYCLE and leaving HOFFSET and HSIZE as-is, but the display didn't like it. It had a difficult time syncing.

Thanks,
mike
Title: Re: BT818 PCLK settings
Post by: BRT Community on October 27, 2021, 04:58:48 PM
Hi,

On many TFT displays a range of values are permitted allowing some flexibility, if yours are different could you advise what screen you are using and a bit more information on it?

Best regards

BRT Community
Title: Re: BT818 PCLK settings
Post by: durian on October 27, 2021, 05:14:10 PM
It's not a specific screen. The display is connected via HDMI. We either use timings provided by the display over HDMI DDC or by using standardized VESA timings.

I thought the BT81x did its scan line rendering during the blanking period (hoffset). If so, why does it need hcycle to be larger than the active (hsize) + blanking (hoffset) periods?

If those extra cycles are indeed required for some purpose, how much time is required? Is it a duration (a certain number of milliseconds or microseconds) or a number of pixel clocks?

mike
Title: Re: BT818 PCLK settings
Post by: BRT Community on November 01, 2021, 02:38:41 PM
Hi,

If you provide the display resolution, we can recommend register settings. Otherwise, please point out which VESA setting is not working.

For HDMI displays, there must be a RGB to HDMI bridge chip between BT818 and HDMI connector. Please make sure the HDMI chip is properly configured.

Best regards

BRT Community
Title: Re: BT818 PCLK settings
Post by: durian on November 01, 2021, 05:40:34 PM
Yes, I have a bridge chip for the HDMI interface. I use a TFP420.

As an example, here is the VESA timing for 640x480 @60MHz:

pixel clock = 25175000
horizontal active pixels = 640
horizontal blank = 160
horizontal front porch = 16
horizontal sync = 96
vertical active lines = 480
vertical blank = 45
vertical front porch = 10
vertical sync = 2

Given this timing, I set the BT818 registers as follows:
HCYCLE = 800
HSIZE = 640
HOFFSET = 160
HSYNC0 = 16
HSYNC1 = 112
VCYCLE = 525
VSIZE = 480
VOFFSET = 45
VSYNC0 = 10
VSYNC1 = 12

I can get output using these timing values (and PCLK twice as fast as required and CSPREAD disabled), but I want to be able to handle general cases as well - where timing information is extracted from the display using DDC and it is not known in advance. Here are my questions:

1) Does the BT818 render each line during the blanking period (HOFFSET)?
2) Why does HCYCLE need to be greater than HSIZE + HOFFSET, instead of greater than or equal to HSIZE + HOFFSET? I don't see any cycles in the Figure 4-6 RGB Timing Waveforms from the datasheet that would allow HOFFSET < HCYCLE - HSIZE.
3) Is the blanking period (HOFFSET) not sufficient for rendering?
4) If it is not sufficient, how do I calculate how much addition time is required?
Title: Re: BT818 PCLK settings
Post by: BRT Community on November 04, 2021, 09:55:47 AM
Hi,

To convert VESA timing to EVE RGB registers, you can refer to BT817/8 Datasheet page 26 Table 4-14 and fig 4-6 https://brtchip.com/wp-content/uploads/Support/Documentation/Datasheets/ICs/EVE/DS_BT817_8.pdf (https://brtchip.com/wp-content/uploads/Support/Documentation/Datasheets/ICs/EVE/DS_BT817_8.pdf); or AN_336 page 6-7 https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/AN_336_FT8xx-Selecting-an-LCD-Display.pdf (https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/AN_336_FT8xx-Selecting-an-LCD-Display.pdf).

CYCLE = active + blank
SIZE = active
OFFSET = sync + back porch ( = blank - front porch)
SYNC0 = 0
SYNC1 = sync

For the given VESA timing for 640x480@60Hz, the recommended BT818 register values are:
HCYCLE = 800
HSIZE = 640
HOFFSET = 144
HSYNC0 = 0
HSYNC1 = 96
VCYCLE = 525
VSIZE = 480
VOFFSET = 35
VSYNC0 = 0
VSYNC1 = 2

PCLK = 1
PCLK_FREQ = 0x0D14 (the closed pixel frequency that BT818 can supply is 25.5MHz)
PCLK_POL = 0 or 1, depend on the HDMI chip clock porality.

1) Does the BT818 render each line during the blanking period (HOFFSET)?

Valid RGB data will start to clock out after HOFFSET, indicated by DE going to active.

2) Why does HCYCLE need to be greater than HSIZE + HOFFSET, instead of greater than or equal to HSIZE + HOFFSET? I don't see any cycles in the Figure 4-6 RGB Timing Waveforms from the datasheet that would allow HOFFSET < HCYCLE - HSIZE.

HOFFSET is not the whole blanking period. It includes sync and back porch, and may include part of the front porch(HSYNC0) . Datasheet Table 4-14 has provided requirements that HOFFSET must be < HCYCLE – HSIZE.

3) Is the blanking period (HOFFSET) not sufficient for rendering?

BT818 scanout does not depend on blanking. The blanking is required by the display panel.

4) If it is not sufficient, how do I calculate how much addition time is required?

Blanking timing is provided by display panel. If the display panel allows a range of blanking period, it is recommended to set BT818 total blanking to the maximum allowed by the display panel, thus more line time for graphics processing.

Best regards

BRT Community
Title: Re: BT818 PCLK settings
Post by: durian on November 04, 2021, 05:18:20 PM
Thank you. AN_336 helps. It says that HOFFSET should be Back Porch + Sync Pulse + (Front Porch - X), where X >= 1. This also applies to SYNC0 and SYNC1. Where ever you see the Front Porch, you should use (Front Porch - X). Table 3.1 and Figure 3.2 show this.

I was using the BT817_8 datasheet (version 1.1 - the same as the one you link to). It is different. Table 4-14 from the datasheet is similar to Table 3.1 in the app note, but does not say to reduce the front porch. The Display Parameter column of Table 4-14 says HOFFSET = Front Porch + Sync Pulse + Back Porch. The Front Porch is used without being reduced. The verbiage in the Description column says HOFFSET < HCYCLE - HSIZE, but that does not agree with what is shown in the Display Parameter column.

This discrepancy is also seen in Figure 4-6. Figure 4-6 is similar to the app note's Figure 3.2. However, the figure in the app note shows a reduced value for the Front Porch. The figure in the datasheet shows the full duration of the Front Porch.

Based on what you are saying, the app note is correct and the datasheet should be corrected.

The app note says X (the value used to reduce the front porch) must be >= 1. Is there any further restriction on this or is it always acceptable to use X=1?

Thank you for the clarification,
mike
Title: Re: BT818 PCLK settings
Post by: moiatto on November 29, 2021, 05:26:41 PM
I gave up .... after 3 days of trying to get the monkey out of the hat with all my knowledge  :(

Until now, I was very happy to use a VM816C50A evaluation board with TFT IPS 5" 800x480. All worked fine...animation, images, all stored in flash. All assets created with old EAB v2.1.0. Perfect with ESP32 and Teensy 4.0 boards.

3 days ago I got a Riverdi RVT70HSBNWC00-B, 7.0" IPS 1024x600 with BT817.

So, I update my library to work with new BT817/8 (I sped up thanks to Rudolph's library. Thanks Rudolph! I'm old school. I use the basic Arduino IDE, No VS IDE, No PlatformIO).

After reading this thread, I initialize the registers of BT817 board in the library with the Riverdi datasheet:
Quote
REG_HSIZE          1024
REG_VSIZE          600
REG_HCYCLE       1344
REG_HOFFSET     160
REG_HSYNC0       0
REG_HSYNC1       70
REG_VCYCLE        635
REG_VOFFSET      23
REG_VSYNC0        0
REG_VSYNC1        10
REG_PCLK             1
REG_SWIZZLE       0
REG_PCLK_POL      1
REG_CSPREAD       0
REG_DITHER         0
REG_PCLK_FREQ    0xD12   // 51 MHz
REG_PCLK_2X        0

See attached Riverdi TFT RGB timing characteristics.

No SPI communication problems with ESP32 and Teensy 4.0 cards.
The BT817 responds well. Problem-free initialization.
Set Flash mode in full speed OK.

set REG_FREQUENCY = 72MHz.
I directly set REG_PCLK_FREQ as suggest here instead of use cmd_pclkfreq. The data read was the same as the set.

The problems start now:

***** with REG_PCLK_FREQ  = 0xD12 (51 MHz) (Riverdi setting) ********
1. Primitives and Widgets work correctly...OK
2. cmd_testcard() show the testcard graphic but with flickering
3. Images and animations from Flash....NOTHING (when try image I see white screen instead with animation black screen)

***** with REG_PCLK_FREQ  = 0x451 (30 MHz) ********
1. Primitives and Widgets work correctly...OK
2. cmd_testcard() show the testcard graphic but with flickering
3. Images and animations from Flash...I can see single small images, if more then two / three, it makes a mess up with flickering, same for the animation. Only small animation (size 150x150 px). otherwise it make a mess up.

***** with REG_PCLK_FREQ  = 0x883 (16 MHz) This one is the least worst ********
1. Primitives and Widgets work correctly... but with flickering
2. cmd_testcard() show the testcard graphic but with flickering
3. Images and animations from Flash....same as 0x451 (30 MHz) but I can distinguish something with wrong colors.

***** with REG_PCLK_FREQ  = 0x891 (54 MHz) ********
1. Primitives and Widgets work correctly...OK
2. cmd_testcard() show the testcard graphic but with flickering
3. Images and animations from Flash....I can see small images sometimes but animation nothing, only many horizontal lines moving downwards

***** with REG_PCLK_FREQ  = 0x891 (60 MHz) default setting ********
1. Primitives and Widgets work correctly...OK
2. cmd_testcard() show the testcard graphic but with flickering
3. Images and animations from Flash....white screen with flickering

***** with REG_PCLK_FREQ  = 0x8C1 (72 MHz) default setting ********
1. Primitives and Widgets work correctly...OK
2. cmd_testcard() show the testcard graphic but with flickering
3. Images and animations from Flash....white screen with flickering


I don't know what other tests I can do anymore  :'(
Title: Re: BT818 PCLK settings
Post by: Rudolph on December 02, 2021, 09:00:13 PM
I do not only have the EVE_RVT70H profile in EVE_config.h , I do have one on my desk right now and it works just fine with this profile.
The "5.x" branch has this as "untested" but the "5_plus" branch has this updated to "/* tested with RVT70HSBNWC00-B */".

I am still using EVE_cmd_pclkfreq() since I have no issue at all with it and there was no explanation whatever issue there might be.

I did encounter a hardware issue with the Teensy 4.1 though, I had to increase the series resistor for the SPI lines between the Teensy and my display adapter board.
One of these boards: https://github.com/RudolphRiedel/EVE_display-adapter/tree/master/L-D5019-01-05
I am not sure what the issue is but every other controller I worked with had no issue.

Title: Re: BT818 PCLK settings
Post by: moiatto on December 07, 2021, 03:34:20 PM
Hi Rudolph,
thanks for your reply.

I have only one slave device connected on SPI bus, the Rivendi TFT without shift levels, because teensy 4.0 works already at 3V3.
I don't use resistors but direct connections. Correct?

With teensy 4.0 board, I init the EVE3/EVE4 with spi bus speed at 12MHz, after it works at 30MHz (with VM816C board works very fine).

After I bit of work on my library, I have resolved some issues with EVE4 chips.

cmd_testcard() works fine now. widgets and primitives too.

Now my problem is with assets stored on flash ram. Expecially with animation frame cmd_animframe().

The assets (images all ASTC 4x4 and animations all ASTC 4x4) on VM816 board work perfectly, but the same assets with BT817 don't work correctly.

I have noticed that with big size images (approximately more then 700x250) and with big size animation (approximately 800x250 for example), the BT817 show white screen or 3 half images of the same frame for example.

I don't understand where the problem is.
The flash state is correctly set in full mode.

What can I try to do?

For last, I have modified your library to work with Arduino IDE and it reports the same issues.
Title: Re: BT818 PCLK settings
Post by: moiatto on December 17, 2021, 07:34:14 PM
Which crystal oscillator do you use or recommend for new custom EVE3 or EVE4 boards? make and model.
Title: Re: BT818 PCLK settings
Post by: BRT Community on December 20, 2021, 11:35:22 AM
Hello,

On our development boards we utilize the Abracon LLC - "ABM8G-12.000MHZ-18-D2Y-T" 12Mhz 18pF crystal.

Best Regards,
BRT Community
Title: Re: BT818 PCLK settings
Post by: Rudolph on December 20, 2021, 01:53:25 PM
>What can I try to do?

I have no real hands-on experience with the animation feature.

>For last, I have modified your library to work with Arduino IDE and it reports the same issues.

What did you modify?

I admit that I am done now with the Arduino "IDE" and strongly suggest to use PlatformIO with VSCode instead to compile for Arduino.

But to make the example compile with the Arduino IDE I just downloaded 1.8.18.
Then I took https://github.com/RudolphRiedel/FT800-FT813/tree/5.x/examples/EVE_Test_Arduino_PlatformIO/src
Renamed the folder to EVE_Test, renamed EVE_Test.cpp to EVE_Test.ino and copied all the .c, .h and .cpp from https://github.com/RudolphRiedel/FT800-FT813 to this folder.

And this fails in EVE_config.h as there is no define for the display.
As I could not find an option in the Arduino IDE to setup defines, I just added #define EVE_RVT70H in line 157 of EVE_config.h and now it compiles fine without warning for the pre-configured UNO.

Building https://github.com/RudolphRiedel/FT800-FT813/tree/5.x/examples/EVE_Test_Arduino_PlatformIO for Arduino with PlatformIO currently gives this result:

Environment                Status    Duration
-------------------------  --------  ------------
uno                        SUCCESS   00:00:01.478
avr_pro                    SUCCESS   00:00:01.245
nano328                    SUCCESS   00:00:01.271
mega2560                   SUCCESS   00:00:01.267
adafruit_metro_m4          SUCCESS   00:00:07.909
samd21_m0-mini             SUCCESS   00:00:03.296
ESP32                      SUCCESS   00:00:06.676
ESP8266_d1_mini            SUCCESS   00:00:07.362
nucleo_f446re              SUCCESS   00:00:09.247
teensy41                   SUCCESS   00:00:04.204
adafruit_feather_nrf52840  SUCCESS   00:00:05.150
bbcmicrobit_v2             SUCCESS   00:00:02.142
teensy35                   SUCCESS   00:00:02.853
xmc1100_xmc2go             SUCCESS   00:00:04.159
Title: Re: BT818 PCLK settings
Post by: Spyy on February 03, 2022, 09:43:09 PM
Hello,

On our development boards we utilize the Abracon LLC - "ABM8G-12.000MHZ-18-D2Y-T" 12Mhz 18pF crystal.

Best Regards,
BRT Community
Hi,

Ok...with this crystal, do i additional external capacitors?

At the moment i am clocking the BT818 chip with an external pwm 50/50 12Mhz signal from my teensy 4.1 and this works fine...but what i saw is that then i get an internal clock of about 69xyz Mhz instead of 72. And when i change my pwm to 12000001 i get 75+Mhz.
Problem was on my custom boards i did not get it to run with an external crystal, it was not starting to clock at all (due to wrong crystal/capacitors???). Only internally worked with a bit confusion results as described...so i changed to external clocking from my teensy...but i want to return to a crystal as recommended..so the value of the capacitors, if needed, would be very interesting..

Thank you

Torsten
Title: Re: BT818 PCLK settings
Post by: Spyy on February 03, 2022, 09:54:14 PM
Hi Rudolph,
thanks for your reply.

I have only one slave device connected on SPI bus, the Rivendi TFT without shift levels, because teensy 4.0 works already at 3V3.
I don't use resistors but direct connections. Correct?

With teensy 4.0 board, I init the EVE3/EVE4 with spi bus speed at 12MHz, after it works at 30MHz (with VM816C board works very fine).

After I bit of work on my library, I have resolved some issues with EVE4 chips.

cmd_testcard() works fine now. widgets and primitives too.

Now my problem is with assets stored on flash ram. Expecially with animation frame cmd_animframe().

The assets (images all ASTC 4x4 and animations all ASTC 4x4) on VM816 board work perfectly, but the same assets with BT817 don't work correctly.

I have noticed that with big size images (approximately more then 700x250) and with big size animation (approximately 800x250 for example), the BT817 show white screen or 3 half images of the same frame for example.

I don't understand where the problem is.
The flash state is correctly set in full mode.

What can I try to do?

For last, I have modified your library to work with Arduino IDE and it reports the same issues.

Concerning SPI speeds...i do the initialisation of the eve chip with 4 Mhz no dma spi and then throttle up to 25Mhz and do the dma spi bursts, which now works fine. Had problems with the intervallTimer of the teensy which was not working for me...it feels a bit of an interference of dma spi and the timer...perhaps interrupt issues. Now i do everything in the loop(), no timers or teensy threads. It is now doing the entire calculations for the display content including sending the display list via spi in approx. 0.1 ms...which seems to me very fast...:)
Title: Re: BT818 PCLK settings
Post by: Rudolph on February 04, 2022, 10:17:11 AM
Hello,

On our development boards we utilize the Abracon LLC - "ABM8G-12.000MHZ-18-D2Y-T" 12Mhz 18pF crystal.

Best Regards,
BRT Community
Hi,

Ok...with this crystal, do i additional external capacitors?

Yes, 2x 33pF should work.
Title: Re: BT818 PCLK settings
Post by: BRT Community on February 04, 2022, 10:21:46 AM
Hello,

Yes the manufacture recommends loading capacitors, we utilize 2x 18pF capacitors in our designs.

Best Regards,
BRT Community