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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Rudolph

Pages: 1 ... 5 6 [7] 8 9 ... 27
91
Discussion - EVE / Re: Blind effect with draw images
« on: October 24, 2022, 03:40:41 PM »
Are you using DL_CLEAR at the beginnning of the display-list?

And I wonder about the comment:
//lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern

How is this identified as a MISRA 20.2 violation?

92
Discussion - EVE / Re: 5" EVE Touchscreen Display
« on: October 13, 2022, 05:14:45 PM »
https://github.com/RudolphRiedel/FT800-FT813

This does not sound like it but the current version of my library actually supports FT810 to BT817.
The file EVE_config.h has timings for most modules with EVE chips on them.
And there is support for quite a number of controllers, Arduino and Bare-Metall, a few with DMA.

What I only barely started though is export support to ESE.

93
Quote
but the complexity of the display list per line and how much time EVE has to throw out pixels per line.

I think normally this should be mentioned within the specification.
This cost me a lot of time.

I am afraid there is no easy answer to this one and a "you may or may not run into timing issues if you compose a very difficult line and your time per line is less than 30µs" would probably help no-one, even if it would be accurate.

Quote
By the way, you name sounds to be from Southern Germany. Are you?

Rudolph is my first name, like the Reindeer. :-)
I am aware though that Rudolph is found as a family name in southern Germany since I am from northern Germany.

94
To wrap this up, I tested this with the RVT50HQBNWC00-B now as well.
And the display list itself really is not the limiting factor.
I currently have it running with 6 LINE_STRIP blocks of 265 segments each.
Plus another block of 170 segments.

The list gets transmitted in two blocks via DMA of 7432 bytes combined and the resulting display list
is 7948 bytes long.


The limiting factor really is not that the display-list can not be bigger than 4 kiB,
but the complexity of the display list per line and how much time EVE has to throw out pixels per line.
Much like the bandwidth of the external flash is a limiting factor so displaying images directly from flash should be used sparingly if not avoided alltogether.
And using fonts from flash is actually displaying images as well, at least we have CMD_FONTCACHE to help with that (but only for a single font).

So we need to put things in RAM_G, especially at resolutions of 800x480 or beyond.
And we have ASTC to help with that, using ASTC 8x8 with only 2 bits per pixel brings down full color images with alpha channel to 1/8 of ARGB1555.

Then EVE_memWrite32(REG_AH_HCYCLE_MAX, EVE_HCYCLE + 500); gives EVE more flexibility with the timing.

And the last measure would be to reduce pixel-clock and therefore the framerate.

95
Discussion - EVE / Re: Monochrome Button
« on: October 04, 2022, 04:37:49 PM »
You are correct, this is 31 one 32bit words, not 38, 21 one for all the simple commands and five each for the two CMD_TEXT.
Fortunately this makes it even more efficient compared to CMD_BUTTON.
And technically the first two commands do not belong in this sequence.

96
Quote
i replaced STRIPLINE through POINTS and also LINES.

Well, both require less computations in EVEs graphics backend,
i can totally see that making a difference.

I merely changed the precision to remove the multiplications on the controller side.

Quote
My value for EVE_HCYCLE is also 1344.

This made it much better:
Code: EVE_memWrite32(REG_AH_HCYCLE_MAX, EVE_HCYCLE + 500);

Also i don't understand what it does?

This allows EVE to extend lines by additional clock cycles and there gives it more time to compute the display-list.


Here is something weird though.
I calculated the time per line in µs based on HCYCLE and the pixel clock.
EVE3_43G: 53.278 µs
EVE3_50G: 25.778 µs
RVT50H: 34 µs
RVT70H: 26.353 µs
RVT101H: 20.282 µs

So actually the BT817 on the RVT70H with 1024x600 has more time per line than the EVE3_50G.
I am using the EVE3_50G with 36 MHz pixel-clock due to limited options to setup the pixel-clock with the FT81x and BT815/BT816, the value for HCYCLE is 928.
On the RVT70H the line is much longer with 1344 and I am using a pxiel clock of 51 MHz.

The time per visible pixel is lower for the RVT70H though - if that even is a valid concern.


I ordered a RVT50HQBNWC00-B as I do not have a BT817 with 800x480 so far.
And I will test what happens when I lower the frame-rate by reducing the pixel-clock.


Edit: I played with it some more.
Now I am using two DMA transfers to reduce the time for the actual transfer, just to make sure
everything is within my intended timing of 50 changes per second.

And I was wrong before, 190+190+190+190+150 is not the limit.
I have it currently running with 6 x 255 Segments, the size of the display-list is 7400 bytes.
The frames per second actually dropped from 60 to 57/58 - which is to be expected when EVE is allowed to lengthen the lines to compensate for more complex lines.

The complexity per line is key.
When I change the last block to overlapped with these before -> tilt.









97
I feel I wasn't clear enough on this, this is not an issue with the FIFO as the 4k limit on the FIFO only applies when sending data in a single transfer.

I am testing this with the RVT70H now, so 1024x600 EVE4 BT817.
My board is using an ATSAME51J19A with 120MHz, SPI clock is 15MHz.

And I am afraid that this is a limitation on the BT817 in combination with the long lines.
Just switching over from the EVE3-50G which has 800x480 and a BT815 I need to reduce
the amount of lines even for the variant with DMA enabled.
190 + 190 + 190 + 190 + 150 = 910 segments is fine
With three output lines more to display the frequency, frames/s and REG_UNDERRUN the total amount for the DMA transfer is 4010 bytes and the resulting display-list is 4912 bytes.

When I increase the last segment to 160 it flickers and the value for REG_UNDERRUN starts to go up.
Setting the last segment to 170 results in 4092 for the DMA transfer and 4992 for the display-list,
this should be fine but really is not.
When I increase it beyond 160 (and above 170 without DMA) things really get weird, this effect looks to me like the render-engine is crashing and restarting, I have seen this before when reading too many images on the fly from the external flash.

The frames are a solid 60/s, there is no drop.

Using EVE_memWrite8(REG_PCLK_2X, 1); does not help at all, looks like the display-list is just too complex.

Using EVE_memWrite32(REG_AH_HCYCLE_MAX, EVE_HCYCLE + 500); helps a lot, still 60 frames/s but no flickering anymore.
My value for EVE_HCYCLE is 1344.
With DMA off I can set the last segment to 310, no problem, the display-list is 5528 bytes.
Further increasing the REG_AH_HCYCLE_MAX does not help anymore.

Now I wonder if I should just add EVE_memWrite32(REG_AH_HCYCLE_MAX, EVE_HCYCLE + 500); as default for BT817/BT818, it does not eliminate the issue but it certainly pushes what is possible.
For the test I put it just after EVE_init().

I can't push it to 1825 segments like with the BT815 and 800x480 but 1070 segments still is a lot and at least a little higher than 920.

Maybe it is worth looking into making the time per line longer.


The 7882 µs in the screenshot is accurate, the ATSAME51 is a lot faster with single SPI transfers than the ESP32.

98
>i'm testing a MicroChip PIC32 EV-board

I would be interested in the target code for this one since I do not have any code for PICs so far.
Never found these attractive, I do not like MPLAB-X at all and Platformio "only" supports the Arduino framework for PIC32.


I just tried this with an EVE3-50G connected to an ESP32-S3 as I had this already connected.
And I pushed it to 5x 365 Line-Strip Segments filling the display-list with 8176 bytes with the attached souce,
this is for everything, the whole display-list.

I modified my basic demo for this:
Code: [Select]
EVE_color_rgb(RED);
EVE_cmd_dl( BEGIN(EVE_LINE_STRIP) );
for(uint16_t i = 0 ; i < 365 ; i++ )
{
    if( i % 2 )
    {
        EVE_cmd_dl(VERTEX2F( i, LAYOUT_Y1));
    }
    else
    {
        EVE_cmd_dl(VERTEX2F( i, LAYOUT_Y1 + 50));
    }
}

EVE_cmd_dl(DL_END);

Now there are a few things to mention.
Usually I am using DMA which limits the amount of bytes that can be send to 4k as the FIFO "only" is 4k.
This is not really an issue since under normal conditions as the display-list is composed by the co-processor with commands like CMD_BUTTON, CMD_TEXT or CMD_NUMBER which need more bytes in the display-list than in the FIFO.
Try this in EVE Screen Editor, add 19 buttons for example and RAM_DL shows around 50%, depending on where the buttons are placed (less with coordinates below 511).
But this is not under normal conditions and you are not using DMA so I switched if off as well for the 5x 365.


With DMA on I just pushed it to 190 per color which resulted in 4076 bytes for the FIFO and 4688 bytes for the display-list.
Using two or more segments to push more than the 4k out by DMA to the FIFO is possible, but beyond the scope right now.

Next thing is that you might be missing an EVE_cmd_dl(DL_END); line.

The EVE_execute_cmd(); lines in between the segments in your version are not doing anything in this context.
All this does is to wait for the FIFO to be empty but since every command is executed on it's own with a separate chip-select cycle and VERTEX2F is just copied over from the FIFO to the display-list by the co-processor, the FIFO is always empty anyways.

And at last this is awfully slow.
The time in the image is wrong, I limited the digits to 4 and num_profile_a was "only" 16 bits.
I consider over 2ms to be not viable for my applications.
With 32 bits and 6 digits I get 118680µs now (ouch), this is for the whole TFT_display() function.
This is mostly for the transfer without DMA (adds 3 bytes overhead) at 10MHz using the ESP32-S3.

And a smaller part is from calculating VERTEX2F since X is at bit 15...29.

Segments of 190 without DMA: 63510µs
Segments of 190 with DMA: 348µs and the SPI transfer itself needs 2069µs.
No segments with DMA: 44µs
So calculating 950 VERTEX2F needs about 300µs - and that is on a 32 bit controller clocked 240MHz.

This still does not answer why it crashes for you and I still need to test this with a BT817.
I am fairly certain though this is neither on my side or the fault of the BT817.

99
I missed EVE_LIB_BeginCoProList command before EVE_CMD_FLASHUPDATE and EVE_CMD_FLASHREAD.

So you are not using my library then, this is AN025.

Quote
Of course in Programming Guide Document in not mentioned about this point and in i found it in uploaded example.

The reason is that none of the commands in AN025 care about chip-select or write the address, even commands like these which are not meant to go in a display list.
And you need a call to EVE_LIB_EndCoProList() as well.
Plus you need to add a line to wait for the command to be executed.

I sorted the functions in my library by commands that are used in display lists and commands that are used outside display lists. And those to be used outside display lists are self-contained, meaning these set chip-select, write the address and wait for the command to be executed if necessary - and the comment says so.

100
(wall of text deleted again)

What are you actually trying to do?

Note that for EVE_cmd_flashupdate(uint32_t dest, uint32_t src, uint32_t num) the destination needs
to be 4096 byte aligned, the source needs to be 4 byte aligned and the number of bytes needs to be a
multiple of 4096.

101
Discussion - EVE / Re: implementing support for formated strings
« on: August 15, 2022, 07:35:27 PM »
I kept using two functions for this.

Code: [Select]
void EVE_cmd_text(int16_t x0, int16_t y0, int16_t font, uint16_t options, const char* text)
...

void EVE_cmd_text_var(int16_t x0, int16_t y0, int16_t font, uint16_t options, const char* text, uint8_t num_args, ...)
{
 eve_begin_cmd(CMD_TEXT);

 spi_transmit((uint8_t)(x0));
 spi_transmit((uint8_t)(x0 >> 8));
 spi_transmit((uint8_t)(y0));
 spi_transmit((uint8_t)(y0 >> 8));

 spi_transmit((uint8_t)(font));
 spi_transmit((uint8_t)(font >> 8));
 spi_transmit((uint8_t)(options));
 spi_transmit((uint8_t)(options >> 8));

 private_string_write(text);

 if(options & EVE_OPT_FORMAT)
 {
  va_list arguments;
  uint8_t counter;

  va_start(arguments, num_args);

  for(counter=0;counter<num_args;counter++)
  {
    uint32_t data;

    data = (uint32_t) va_arg(arguments, int);
    spi_transmit_32(data);
  }
  va_end(arguments);
 }
EVE_cs_clear();
}

Adding a parser to count the number of arguments really felt like too much overhead.
The varargs API is plainly just broken in my opinion and that has nothing to do with EVE, you do not get the numer of entries in the list and what happens when you call va_arg() beyond the list is undefined.

102
Discussion - EVE / Re: Touch Returns Incorrect Tag/Track Value
« on: July 26, 2022, 05:59:55 PM »
I posted this yesterday and somehow it got lost.
I asked about your SPI clock and if you tried to lower it.

I am seeing this with my hardware as well, in the last test I conducted I got to 17MHz before touch stopped working
but could use 40MHz just fine for the writes.

What does your hardware up to the FFC connector look like?
I am using one of these https://github.com/RudolphRiedel/EVE_display-adapter/tree/master/L-D5019-08
And this one may work a bit higher for the reads.

My guess is that the turnaround-delay is getting too high between the clock-signal and MISO, especially with glue-logic in between.

103
Discussion - EVE / Re: Monochrome Button
« on: July 12, 2022, 04:28:21 PM »
Yes, I regulary use two rects over each other to draw frames.
An alternative would be using LINE_STRIP, but then the width of the frame depends on LINE_WIDTH so you can't have rounded corners and thin frames with LINE_STRIP.

Try this in EVE Screen Editor:

Code: [Select]
CLEAR_COLOR_RGB(0,0,0)
CLEAR(1, 1, 1)
LINE_WIDTH(80)
BEGIN(RECTS)
COLOR_RGB(255,215,0)
TAG(100)
VERTEX2F(1600, 1600)
VERTEX2F(3200, 2240)
TAG(110)
VERTEX2F(1600, 2560)
VERTEX2F(3200, 3200)
COLOR_RGB(0,0,0)
TAG(110)
VERTEX2F(1632, 2592)
VERTEX2F(3168, 3168)
END()
TAG(100)
COLOR_RGB(0,0,0)
CMD_TEXT(150, 120, 28, OPT_CENTER, "MUTE")
TAG(110)
COLOR_RGB(255,215,0)
CMD_TEXT(150, 180, 28, OPT_CENTER, "NEXT")
TAG(0)

As for efficiency, this sequence uses 38 32bit words on the display-list.
The only way to get away with less would be to use images for the buttons.
In contrast, a single FLAT button with the text "MUTE" uses 16 or 20 32bit words, depending on the posistion of the screen, just the button without TAG or color commands.

Doing this in discrete commands also allows to split the display list in a part that is static and therefore only needs to be transferred once (see CMD_APPEND) and the part that is transferred for every refresh because it changes.

In this example the first rectangles could be moved to the static section.

You could easily add visual feedback to this by for example not drawing the second
rectangle when the button is touched and changing the color of the text to black.

104
Discussion - EVE / Re: Monochrome Button
« on: July 06, 2022, 10:43:38 PM »
For simple buttons I just use rectangles with text on them and change the color when pressed.
And by changing the line-width you can have rectangles with rounded corners.

For EVE Screen Editor:
CLEAR(1, 1, 1)
TAG(100)
LINE_WIDTH(100)
BEGIN(RECTS)
COLOR_RGB(255,255,100)
VERTEX2F(3376, 2896)
VERTEX2F(5264, 3776)
END()
COLOR_RGB(0,0,0)
CMD_TEXT(223, 195, 28, 0, "My Button")
TAG(0)


105
Shared Projects / Re: 4.3" EVE3 in a Cold Brewer!
« on: May 24, 2022, 06:32:13 PM »
This forum needs a like button.  :)

Now I kind of want one. :)
But holy smokes, 5 gallons? That is like 20l?
That is maybe something to recommend for the company restaurant. ;)

Pages: 1 ... 5 6 [7] 8 9 ... 27