BRT Community

General Category => Discussion - EVE => Topic started by: JuSil on September 17, 2021, 12:23:45 PM

Title: Unwanted stripes on the EVE4 1024x600 picture
Post by: JuSil on September 17, 2021, 12:23:45 PM
Hello,
I have problem with this EVE4 7" display, old EVE3 7" 800x480 worked fine.
In attachment file is a photo from my display.
My code base is the same only few lines added to initialize.

    #ifdef EVE4
       EVE_MemWrite16(REG_PCLK_FREQ,           PCLK_FREQ);
       EVE_MemWrite8(REG_ADAPTIVE_FRAMERATE,  ADAPTIVE_FRAMERATE);
    #endif

I got the timing parameters from Riverdi.
#ifdef EVE4
    #define DWIDTH     1024
    #define DHEIGHT    600
    #define PIXVOFFSET   0
    #define PIXHOFFSET   0
    #define HCYCLE     1344
    #define HOFFSET     160
    #define HSYNC0       0
    #define HSYNC1      70
    #define VCYCLE     635
    #define VOFFSET     23
    #define VSYNC0       0
    #define VSYNC1      10
    #define PCLK         1
    #define SWIZZLE      0
    #define PCLK_POL     1
    #define HSIZE      1024
    #define VSIZE      600
    #define CSPREAD      0
    #define DITHER       0
    #define PCLK_FREQ    0xd12 //0xe12
    #define PCLK_2X      0
    #define ADAPTIVE_FRAMERATE 0
    #define AH_HCYCLE_MAX 0
    #define DISPWIDTH_HSF      1076
#endif

Only PCLK_FREQ I changed to 0xd12 , riverdi value was 0xe12.
0xe12 makes stripes even more.

What I'm doing wrong? What is purpose of DISPWIDTH_HSF ?
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: TFTLCDCyg on September 17, 2021, 09:33:45 PM
To verify that the initialization of the screen is correct, in EVE 4 we have the possibility of loading a test screen through the CMD_TESTCARD () register.

According to BRT_AN_033_BT81X_Series_Programming_Guide, page 189:

Features of the testcard are:
• white border at the extents to confirm screen edges and clock stability
• red, green, blue and white gradients to confirm color bit depth
• horizontal and vertical checker patterns to confirm signal integrity
• circle graphics to confirm aspect ratio
• radial line pattern to confirm antialias performance
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: LaZorraBRT on September 20, 2021, 02:33:49 AM
Jusil,
Would you be willing to share the rest of your code? I'd like to try it on the Eve4 display that I have and see how it works. I'm having issues myself coming from a Eve3 to an Eve4.  Thanks!

T
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: Rudolph on September 20, 2021, 04:41:20 PM
The display parameters are looking ok.
Well, except for this: "#define PCLK_FREQ    0xd12 //0xe12" which I can not check on the fly.
Ok, table 4-11 in the datasheet has D12 as value for 51MHz which is probably right.

My library has it defined like this:
/* RVT70HSBxxxxx 1024x600 7.0" Riverdi, various options, BT817 */
#if defined (EVE_RVT70H)
#define EVE_HSIZE   (1024L)
#define EVE_VSIZE   (600L)

#define EVE_VSYNC0   (0L)
#define EVE_VSYNC1   (10L)
#define EVE_VOFFSET   (23L)
#define EVE_VCYCLE   (635L)
#define EVE_HSYNC0   (0L)
#define EVE_HSYNC1   (70L)
#define EVE_HOFFSET (160L)
#define EVE_HCYCLE    (1344L)
#define EVE_PCLK   (1L) /* 1 = use second PLL for pixel-clock in BT817 / BT818 */
#define EVE_PCLK_FREQ (51000000L) /* EVE_PCLK needs to be set to 1 for this to take effect */
#define EVE_PCLKPOL (1L)
#define EVE_SWIZZLE (0L)
#define EVE_CSPREAD   (0L)
#define EVE_TOUCH_RZTHRESH (1200L)
#define EVE_HAS_CRYSTAL
#define EVE_GEN 4
#endif

And the reason why I am using "#define EVE_PCLK_FREQ (51000000L)" is that the BT817/BT817 actually have a command to configure the second PLL with: CMD_PCLKFREQ
The description for REG_PCLK_FREQ on the other hand is rather difficult to understand in comparision.

Since I already have a RVT101HVBNWC00-B up and running and had to design a new PCB for it, I know that these are bit tricky in terms of power consumption.
How do you connect the display to your micro and more importantly, how do you supply both the logic and the backlight rails?
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: BRT Community on September 20, 2021, 05:03:59 PM
Hello,

Thank you for you inquiry, could you please advise where the image is being stored (flash or ram)?

Also could you send the code you are using to display it and the image you are trying to display?

Best regards

BRT Community

Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: JuSil on September 21, 2021, 03:18:12 PM
Hello,
image is in the flash.
I tested CMD_TESTCARD and that looks fine.

I think this is a Flash related problem, some how.
Everything seems to work fine if it's not from the flash.
I made similar screen using EVE screen editor and uploaded image to RAMG, ok.

Now I can't update assets to flash with my own bootloader program, or not even Eve Asset builder.
This is second similar Riverdi screen, which have now similar issue.
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: Rudolph on September 21, 2021, 05:27:07 PM
I saw that RVT70HSBNWC00-B are available from Mouser and with free shipping, so I ordered one. :-)
Which controller do you use?
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: Rudolph on September 23, 2021, 06:23:06 PM
The RVT70HSBNWC00-B arrived today and is up and running just fine.
The only "issue" was that the backlight for the RVT70H is specified to be TBD/5.0/6.0 V with currents listed for 3.3V and 5.0V.
For the RVT101H it is 5.0/9.0/14.0 V. And the board I designed for the RVT101H currently does supply around 7.2V for the backlight - so I need to populate a new board.

RVT35H: 2.7/5.0/6.0 V - while the datasheet list currents for 7.0V, 9.0V and 12.0V as well
RVT43H: 3.0/5.0/6.0 V - while the datasheet list currents for 7.0V, 9.0V and 12.0V as well
RVT50H: 2.7/5.0/6.0 V - while the datasheet list currents for 7.0V, 9.0V and 12.0V as well

I guess the datasheets are still  not final.


Anything in particular I can test?
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: JuSil on September 24, 2021, 08:39:30 AM
Hello,
I have my own PIC24 based system (USB IO device) and coded using CCS C compiler. For testing and faster asset uploading I have Riverdi Hermes board (SPI USB bridge rev 1.0)
Now my situation is. I can't upload or erase Flash using EVE asset builder v2.1.0
Detection sometimes fails, sometimes found something.... quite frustrating...
Log:
Detecting flash...

Flash size: 64 MB       .........Wrong should be 128MB
Blob is NOT present.   ..........Last I did was erase.
Flash can NOT switch to full speed.
END
BEGIN
Calculate reading speed...
Reading speed: 0.31 MB/s
Reading 1 MB in 3.19 seconds
END
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: BRT Community on September 24, 2021, 10:14:42 AM
Hi JuSil,

You can also put the image into flash with the EVE Screen Editor and so that might be worth trying

If it also gives the lines in ESE when you output to the module, could you send us a copy of the image and we can try it,

EVE4 also has a few features which can help to give more time for the display lines to be rendered. Please see page 51 of the Programmers guide:
https://brtchip.com/wp-content/uploads/Support/Documentation/Programming_Guides/ICs/EVE/BRT_AN_033_BT81X_Series_Programming_Guide.pdf

- Adaptive Frame rate varies the PCLK to allow more time for the screen to be rendered in cases where there are a lot of items to render. however, it is for RGB panels only and not all panels support it. Therefore, you could check this is off,

- REG_AH_HCYCLE_MAX is a new feature in BT817/8 which instead extends the HCYCLE value in cases where there are too many items to render in the time available (e.g. how much time one row has based on PCLK and number of pixels in a row). You could try this to see if allowing EVE to extend the HCYCLE time helps.

- There is also REG_UNDERRUN which allows you to check if the underrun is occurring and if so the REG_AH_HCYCLE_MAX may help.

If it works from RAM, it sounds like the image data being read from flash is slowing down the rendering. You could check that the BLOB is loaded and that the flash is in full speed mode. Also, if you try a lower quality conversion of the same image this may help to confirm if the issue is related to this.

For flash programming, please ensure that your module gets sufficient power from the USB adapter  as if the voltage to EVE or the flash droops, you get communication errors. Also, make sure all of the SPI cables are well connected and are as short as possible to avoid any signal quality issues.

Best Regards, BRT Community

Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: Rudolph on September 25, 2021, 11:27:49 AM
For testing and faster asset uploading I have Riverdi Hermes board (SPI USB bridge rev 1.0)
Now my situation is. I can't upload or erase Flash using EVE asset builder v2.1.0
Detection sometimes fails, sometimes found something.... quite frustrating...

I do have a Hermes board as well and it works quite well for me with the RVT70HSBNWC00-B.
Have you switched from FT4222 to MPSSE in EAB?

Quote
Detecting flash...

Flash size: 64 MB       .........Wrong should be 128MB
Blob is NOT present.   ..........Last I did was erase.
Flash can NOT switch to full speed.
END
BEGIN
Calculate reading speed...
Reading speed: 0.31 MB/s
Reading 1 MB in 3.19 seconds
END

Actually, 64MB is correct, this is MiB and the EVE4 modules from Riverdi all have a 512 Mib chip.

When using the progflash.exe directly from the command line I get:

ProgFlash chip BT817/8 module MPSSE detect except_writing

Single RS232-HS (MPSSE, )
Flash size: 64 MB
Blob is present.
Flash can switch to full speed.
END
BEGIN
Calculate reading speed...
Reading speed: 9.25 MB/s
Reading 10 MB in 1.08 seconds
END

The highest reported reading speed I got from a number of calls was 9.36 MiB/s which is rather low.
But I am not getting higher values now from BT815 modules I connected to the Hermes board so
that might be on the version of Progflash.exe that is part of the EAB 2.2.0 package.

On the other side we have a QSPI running at 36MHz (?) which means maximum raw thruput would be 17 Mib/s and more realistically about 13 Mib/s useable maximum datarate.
If it is indeed this fast there is a good chance that the difference in speed is due to the USB connection and/or Windows.

I have a blob on the module as I wrote a flash-image with a UTF-8 font from my application.
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: Rudolph on September 25, 2021, 08:13:14 PM
Ok, I tried a couple of things with the RVT70HSBNWC00-B and the attached image shows how far I got.

The icons are 128x128 pixel and in ASTC 8x8 format.
And to give credit these are from the fruit-and-vegetable-icons-by-bian-hong-bing set downloaded from Softicons.com.
These are free to use for non-commercial purposes.

I created this flash-image with EAB:
unified.blob                                                : 0      : 4096
Funtype_24_ASTC.glyph                                       : 4096   : 80832
Funtype_24_ASTC.xfont                                       : 84928  : 320
apple_green_96x96_COMPRESSED_RGBA_ASTC_8x8_KHR.raw          : 85248  : 2304
apple_red_96x96_COMPRESSED_RGBA_ASTC_8x8_KHR.raw            : 87552  : 2304
Chinese goosebeery_96x96_COMPRESSED_RGBA_ASTC_8x8_KHR.raw   : 89856  : 2304
Hami melon_96x96_COMPRESSED_RGBA_ASTC_8x8_KHR.raw           : 92160  : 2304
lemon_96x96_COMPRESSED_RGBA_ASTC_8x8_KHR.raw                : 94464  : 2304
orange_96x96_COMPRESSED_RGBA_ASTC_8x8_KHR.raw               : 96768  : 2304
pimiento_96x96_COMPRESSED_RGBA_ASTC_8x8_KHR.raw             : 99072  : 2304
pumpkin_96x96_COMPRESSED_RGBA_ASTC_8x8_KHR.raw              : 101376 : 2304
tomato_96x96_COMPRESSED_RGBA_ASTC_8x8_KHR.raw               : 103680 : 2304
apple_green_128x128_COMPRESSED_RGBA_ASTC_8x8_KHR.raw        : 105984 : 4096
apple_red_128x128_COMPRESSED_RGBA_ASTC_8x8_KHR.raw          : 110080 : 4096
Chinese goosebeery_128x128_COMPRESSED_RGBA_ASTC_8x8_KHR.raw : 114176 : 4096
Hami melon_128x128_COMPRESSED_RGBA_ASTC_8x8_KHR.raw         : 118272 : 4096
lemon_128x128_COMPRESSED_RGBA_ASTC_8x8_KHR.raw              : 122368 : 4096
orange_128x128_COMPRESSED_RGBA_ASTC_8x8_KHR.raw             : 126464 : 4096
pimiento_128x128_COMPRESSED_RGBA_ASTC_8x8_KHR.raw           : 130560 : 4096
pumpkin_128x128_COMPRESSED_RGBA_ASTC_8x8_KHR.raw            : 134656 : 4096
tomato_128x128_COMPRESSED_RGBA_ASTC_8x8_KHR.raw             : 138752 : 4096

The pixel-clock is set to 51MHz, I did not try to lower or to increase the HCYLE value.
I switched off adaptive framerate by writing 0 to REG_ADAPTIVE_FRAMERATE which has a reset-default value of 1.
Setting up REG_AH_HCYCLE_MAX to for example HCYCLE + 2000 makes no difference.
And while the UTF-8 font is located in the flash, I setup a font-cache of 32KiB.

The first line of icons is displayed directly from flash.
So the maximum of different icons of this size is four, one more and EVE fails to display.
But displaying eight in total is no problem.

For the second row the images are copied from the flash to RAM_G.
This demonstrates that the images are not the issue.
And since the icons are only 4KiB each as ASTC 8x8 this would be my preferred way to do this unless my application runs out of RAM_G.
In comparision one 128x128 full pixel image with alpha channel would take 32KiB as ARGB1555.

When I change the second row to use 96x96 icons from the flash it displays 7 different icons fine and fails when an eighth is added.

When I disable the fontcache it fails.
When I switch adaptive framerate back on it fails.
When I change the fifth icon to a smaller 96x96 pixel version it fails.

To be fair, this is not an issue with the module from Riverdi.
I ran into this bandwidth issue with the first BT817 module I received and I observed this issue with BT815 modules as well.
It is just less likely to run into this with 800x480 or below.

So bottom-line, while it is possible to display images directly from flash it should be avoided as long as there is enough RAM_G available.
The demo in the picture uses or rather reserves a total of 102912 bytes currently, this is less than 10%.
This is 36864 for 9 icons copied from flash.
32768 for the fontcache
Plus 33280 for the .xfont file, the logo, the star image and a stored display-list segment that is added with CMD_APPEND.
So the fontcache could be smaller and the last section is far from optimized.
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: LaZorraBRT on September 26, 2021, 10:19:04 PM
Quote
Log:
Detecting flash...

Flash size: 64 MB       .........Wrong should be 128MB
Blob is NOT present.   ..........Last I did was erase.
Flash can NOT switch to full speed.

For what it's worth JuSil, I am having the exact same issue with my EVE4 display and USB2SPI board from MatrixOrbital.  Quite frustrating.
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: JuSil on September 28, 2021, 01:46:45 PM
Quote
Log:
Detecting flash...

Flash size: 64 MB       .........Wrong should be 128MB
Blob is NOT present.   ..........Last I did was erase.
Flash can NOT switch to full speed.

For what it's worth JuSil, I am having the exact same issue with my EVE4 display and USB2SPI board from MatrixOrbital.  Quite frustrating.

I know the feeling.
I think that could be bug in the EVE AB, that tries to use flash as full speed even without Blob.
I added CMD_FLASHATTACH(); before erase in my own upload software routine. Now uploading also works with EVE AB
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: JuSil on September 28, 2021, 01:56:54 PM
Thanks Rudolph and others,
I got rid of those stripes.
I downloaded too many icons from flash. Funny that same code worked in EVE3
Now I download all Icons to RAMG once. In this case this style works, but in the other project background is so big that RAMG ends.   
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: moiatto on December 07, 2021, 07:14:14 PM
I have the same issues with this Riverdi 7" IPS BT817 module.

The flash section is very poor. No way to detect the EVE4 with EAB v2.4.1 at any spi clock rate. Only with EAB v2.1.0 I can flash it with reading speed: 4,57MB/s.

Instead with VM816 BT816 board I can flash also without problems with EAB v2.4.1. I f a set spi clock clock rate at 16MHz I can detect and read at 9,81MHz. Any big image 800x480 ATSC_4x4 is displayed perfectly and big size animation too.

But with this Riverdi module I'm having only problems.

Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: fr3ud on December 10, 2021, 05:38:42 PM
Hi there, same problem here
I'm having troubles sending images to the flash of the Riverdi 7" BT817Q, in get this error while trying to detect flash with EAB 2.4.1 :
Quote
Detecting flash...
Flash size: 0 MB

Blob is NOT present.

Flash can switch to full speed.
END

BEGIN
Calculate reading speed...

Reading speed: 10.00 MB/s
Reading 10 MB in 1.00 seconds
END

I'm using a FT232h USB to SPI (CJMCU-232H)
In EAB > Flash utilities :
EVE Chip = BT817/8 
Programmer Module MPSSE
SPI Clock Rate 12Mhz

I will try like suggested by moiatto to use EAB 2.1.0
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: moiatto on December 12, 2021, 08:06:19 PM
After all tests, I arrived at the conclusion that these BT817/8 series are mutilated and born without the fundamental thing:
greater size of RAM_G.

I like that they are an upgrade version of BT815/6, but the designers know that if increase the supported resolutions (for example 1024x600 on TFT 7") and know the limit baud rate of the external qspi flash memory, at least you have to increase the size of the RAM_G which starts to get ridiculous and severely limits the use of these new chips with images and animations bigger and bigger.

In my case, for example, a bigger animation (ATSC 4x4, 770x340, size 2,7k) that works perfectly on BT815/6 at 800x480, the same animation on BT817/8 at 1024x600 it's impossible to show in no way. I have tried all. Only in a poor ATSC 8x8 with "adaptive frame rate" and "adaptive HSync" enabled, I can see a bad copy on the screen, without other assets that I have not considered and that work perfectly on BT815/6.

Sorry but for me it failed.

Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: Rudolph on December 12, 2021, 10:47:03 PM
I just connect my RVT70HSBNWC00-B with the Riverdi Hermes board.

And EAB 2.4.1 at first detects the display just fine, see the attached image.
Then EAB crashes and just closes without error message.
And it takes down the interface as well, I have to remove it from USB.

I also replaced the original 15cm FFC with a 5cm one, no difference.

EAB 2.4.0 does the same.

Very odd is that the Hermes board does not use a FT4222 but a FT232HQ so the correct setting would be MPSSE.
But with MPSSE it does not work at all.

EAB 2.2.0 - almost the same result, detect works with FT4222 selected, then it hangs for a couple of seconds but it recovers with "Detect Fail!"

EAB 2.1.0 - works with MPSSE, fails with FT4222

EAB 2.1.0 comes with a ProgFlash.exe that has 43520 bytes:
C:\Users\Public\Documents\EVE Asset Builder>progflash
Welcome to BT81X Flash Programming Utility v1.1

EAB 2.2.0 comes with a ProgFlash.exe that has 154624 bytes:
C:\Users\Public\Documents\EVE Asset Builder>progflash
Welcome to BT81X Flash Programming Utility v1.1

Yes, the output is exactly the same.

The newer version also fails on the command-line.

EAB 2.4.0 comes with a ProgFlash.exe that has 155136 bytes:
C:\Users\Public\Documents\EVE Asset Builder>progflash
Welcome to BT81X Flash Programming Utility v1.2

And now it works as it should - what??

EAB 2.4.1 also comes with a ProgFlash.exe that has 155136 bytes:
C:\Users\Public\Documents\EVE Asset Builder>progflash
Welcome to BT81X Flash Programming Utility v1.2

And it works now fine as well, FT4222 mode does not work.
And now it stopped working again, testing from the command line.

Remove from USB, wait a few seconds, EAB progflash.exe from 2.1.0 works again, progflash.exe from 2.2.0 works, progflash.exe from 2.4.0 works, progflash.exe from 2.4.1 works.
I using them like this: progflash_2_4_1 module MPSSE detect except_writing

Ok, I updated to USB driver CDM212364, sorry, forgot to check what I had installed.

EAB 2.4.0 with MPSSE setting does crash again.
Progflash.exe from 2.4.1 on command line fails.
USB disconnect / re-connect
Progflash.exe from 2.1.0 on command line works.
Progflash.exe from 2.4.1 on command line fails.
USB disconnect / re-connect
Progflash.exe from 2.4.0 on command line fails.
USB disconnect / re-connect
Progflash.exe from 2.2.0 on command line fails.
USB disconnect / re-connect
Progflash.exe from 2.1.0 on command line works.

switching to an EVE3-50G from Matrix Orbital
Progflash.exe from 2.4.1 on command line fails.
USB disconnect / re-connect
Progflash.exe from 2.1.0 on command line works.
Progflash.exe from 2.2.0 on command line works.
Progflash.exe from 2.4.0 on command line works.
Progflash.exe from 2.4.1 on command line works.

Whatever this is, progflash.exe does not currently work stable and this is not limited to the RVT70HSBNWC00-B.

Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: fr3ud on December 18, 2021, 06:20:03 PM
Would you mind sharing a copy of EAB 2.1.0? Or is there a repo with the olders versions that I didn't find?
Thanks!
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: Rudolph on December 20, 2021, 01:16:08 PM
I can't attach it here since it has 82MB and I do not know if this is ok with BRT.
And it would be nice to see this fixed.
Title: Re: Unwanted stripes on the EVE4 1024x600 picture
Post by: BRT Community on December 20, 2021, 03:07:12 PM
Hello,

EAB 2.1,0 RC2 can still be downloaded from the following:
https://brtchip.com/wp-content/uploads/Utilities/EVE-Asset-Builder-setup-2.1.0-rc2.zip (https://brtchip.com/wp-content/uploads/Utilities/EVE-Asset-Builder-setup-2.1.0-rc2.zip)

Best Regards,
BRT Community