BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Pages: [1] 2

Author Topic: Unwanted stripes on the EVE4 1024x600 picture  (Read 2580 times)

JuSil

  • Newbie
  • *
  • Posts: 10
    • View Profile
Unwanted stripes on the EVE4 1024x600 picture
« 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 ?
Logged

TFTLCDCyg

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Unwanted stripes on the EVE4 1024x600 picture
« Reply #1 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
Logged

LaZorraBRT

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Unwanted stripes on the EVE4 1024x600 picture
« Reply #2 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
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 291
    • View Profile
Re: Unwanted stripes on the EVE4 1024x600 picture
« Reply #3 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?
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 561
    • View Profile
Re: Unwanted stripes on the EVE4 1024x600 picture
« Reply #4 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

Logged

JuSil

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Unwanted stripes on the EVE4 1024x600 picture
« Reply #5 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.
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 291
    • View Profile
Re: Unwanted stripes on the EVE4 1024x600 picture
« Reply #6 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?
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 291
    • View Profile
Re: Unwanted stripes on the EVE4 1024x600 picture
« Reply #7 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?
Logged

JuSil

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Unwanted stripes on the EVE4 1024x600 picture
« Reply #8 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
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 561
    • View Profile
Re: Unwanted stripes on the EVE4 1024x600 picture
« Reply #9 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

Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 291
    • View Profile
Re: Unwanted stripes on the EVE4 1024x600 picture
« Reply #10 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.
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 291
    • View Profile
Re: Unwanted stripes on the EVE4 1024x600 picture
« Reply #11 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.
Logged

LaZorraBRT

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Unwanted stripes on the EVE4 1024x600 picture
« Reply #12 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.
Logged

JuSil

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Unwanted stripes on the EVE4 1024x600 picture
« Reply #13 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
Logged

JuSil

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Unwanted stripes on the EVE4 1024x600 picture
« Reply #14 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.   
Logged
Pages: [1] 2