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.

Topics - Rudolph

Pages: [1] 2 3
1
Discussion - EVE / inexpensive camera module with LVDS interface?
« on: September 30, 2024, 04:35:25 PM »
Not trying to discuss why, yet. :-)

But I am looking for an inexpensive camera module with LVDS interface.
And I am not finding any.

Either the cameras have USB, parallel Interface or MIPI-CSI.
Or I find cameras for 400+ EUR/USD.

Anything from 320x240 up to 2.3MP should do.

Maybe that is just something that is difficult to search for?


2
Ok, that this is supposed to actually display an Image surprised me:
Code: [Select]
Gpu_CoCmd_LoadImage(phost, 0, OPT_FLASH );
//Start drawing bitmap
App_WrCoCmd_Buffer(phost, BEGIN(BITMAPS));
App_WrCoCmd_Buffer(phost, VERTEX2II(0, 0, 0, 0));
App_WrCoCmd_Buffer(phost, END());

This made me wonder if Riverdi implemented the command with some extra lines.

But I found this in the BRT_AN_033_BT81X_Series_Programming_Guide V2.4:
Code: [Select]
cmd_loadimage(0, 0);
... // JPEG file data follows
cmd(BEGIN(BITMAPS));
cmd(VERTEX2II(10, 20, 0, 0)); // draw bitmap at (10,20)
cmd(VERTEX2II(100, 20, 0, 0));

This suggests that this is somehow supposed to work like this.

Next I did this in EVE Screen Editor:
Code: [Select]
CLEAR(1, 1, 1)
CMD_LOADIMAGE(0, 0, "someimage.png")
BEGIN(BITMAPS)
VERTEX2F(0)
END

And ESE was indeed displaying the image.

The generated display list is:
Offset
(decimal)          Raw      Text
0          0x26000007      CLEAR(1, 1, 1)
1          0x01000000      BITMAP_SOURCE(0)
2          0x28000000      BITMAP_LAYOUT_H(0, 0)
3          0x07310040      BITMAP_LAYOUT(ARGB4, 128, 64)
4          0x29000000      BITMAP_SIZE_H(0, 0)
5          0x08008040      BITMAP_SIZE(NEAREST, BORDER, BORDER, 64, 64)
6          0x1f000001       BEGIN(BITMAPS)
7          0x40000000      VERTEX2F(0, 0)
8          0x21000000      END()
9          0x00000000      DISPLAY()

Wait a second, CMD_LOADIMAGE is not supposed to have that effect.
But at least in ESE this works for FT81x, BT81x and BT88x.

I downloaded the sources from https://github.com/riverdi/riverdi-eve/tree/master and CoPro_Cmds.c has the implementation:

Code: [Select]
void Gpu_CoCmd_LoadImage(Gpu_Hal_Context_t *phost,uint32_t ptr, uint32_t options)
{
  Gpu_CoCmd_StartFunc(phost,CMD_SIZE*3);
  Gpu_Copro_SendCmd(phost, CMD_LOADIMAGE);
  Gpu_Copro_SendCmd(phost, ptr);
  Gpu_Copro_SendCmd(phost, options);
  Gpu_CoCmd_EndFunc(phost,(CMD_SIZE*3));
}

Nothing extra, just the command.
But somehow this still displays images? How?


So I tried to reproduce this on a display with BT817 with my library.
And I can not reprocuce this behaviour.
REG_CMD_DL does not change when I am issuing a CMD_LOADIMAGE.
And reading 20 bytes anyways from where REG_CMD_DL is pointing does not return BITMAP_SOURCE and so on.
Manually writing a different offset to REG_CMD_DL and reading it back afterwards shows no change either.

Code: [Select]
My last test code is this:
EVE_memWrite16(REG_CMD_DL, 0);
EVE_cmd_dl(0xdeadbeef);
EVE_cmd_loadimage(MEM_PIC1, EVE_OPT_NODL, pic, sizeof(pic));
EVE_cmd_dl(0xcafecafe);
EVE_execute_cmd();

for(uint8_t index = 0; index < 5; index++)
{
  array_test[index] = EVE_memRead32(EVE_RAM_DL + (4 * index));
}

array_test[5] = EVE_memRead16(REG_CMD_DL);

The EVE_cmd_loadimage() is working just fine, that image is loaded into memory and displayed with my regular display list.
But displaying the values from the array on screen only shows this:
DEADBEEF
CAFECAFE
30000000
30000000
27000000
8

And seeing that there is nothing in the CMD_LOADIMAGE doku that suggests that display list commands are generated, this result is to be expected.

What is going on then with ESE and especially the Riverdi / Bridgtek library?

3
Discussion - EVE / PNG issue with EAB
« on: June 04, 2024, 05:15:03 PM »
The attached .zip has two .png files:
app_blocking_BAD.png
arrow_WORKS.png

And as the names imply, the one works, the other does not.
Why is that and what can I do to convert these .png into files that are compatible with EAB?


The icons are from Google: https://fonts.google.com/icons
There also is a Github repository: https://github.com/google/material-design-icons

What I am doing is to convert a bunch of icons to ASTC 8x8, load these into a BT817 and display them from RAM_G.
While arrow_WORKS.png works just fine as well as the other icons I received the same way, app_blocking_BAD.png and a lot of other icons I received differently just are displayed with a mono-chrom square although EAB claims the .png is valid and compatibel.
I loaded the files into paint.net and saw no fundamental difference, these are white symbols with alpha channel.
Saving app_blocking_BAD.png with paint.net made no difference, saving an "optimized" version with EAB made no difference.

Ok, how did I get these.
The file arrow_WORKS.png is from a set of icons that I manually downloaded from the web page like this:
https://fonts.google.com/icons?selected=Material+Symbols+Outlined:home:FILL@0;wght@400;GRAD@0;opsz@20&icon.size=16&icon.color=%23FFFFFF

But well, there are a lot of icons.

The Github repository: https://github.com/google/material-design-icons is a major pain as well, first the way the files are organized:
https://github.com/google/material-design-icons/tree/master/src/alert/add_alert/materialiconsoutlined/24px.svg
https://github.com/google/material-design-icons/tree/master/png/communication/call_made/materialiconsoutlined/48dp/1x/outline_call_made_black_48dp.png

A co-worker was intrigued and came up with a script that extracts the .svg, scales them with white color and alpha and saves them all in one folder.
The result are two folders so far with over 2000 icons each, one 64x64, the other 48x48.

I randomly selected 50 from the 64x64 for a test, converted these to ASTC 8x8 and only got colored squares on the display as a result.

4
Discussion - EVE / Screen rotation issue with BT817 on 1280x800
« on: May 01, 2024, 12:00:41 PM »
I am using a RVT101HVBNWC00-B from Riverdi which is a BT817 with a 1280x800 panel.
And to rotate the screen does not work properly, just flipping it with either REG_ROTATE set to 1 or using CMD_SETROTATE(1) causes major distortion.

When I use CMD_SETROTATE(5) it curiously works fine though, I have no use for a mirrored image though.

0 - image is fine, just for reference
1 - image is distorted
2 - image is fine
3 - image is distorted
4 - image is distorted
5 - image is fine
6 - image is fine
7 - image is distorted

And right now it does not have to display much at all, it looks like this with more empty pixels:
https://github.com/RudolphRiedel/FT800-FT813/blob/5.x/example_pics/CFAF800480E0_050SC_Arduino_Uno.jpg

Pixelclock is 72MHz with REG_PCLK_2X set to 1.

Hmm, I dropped the pixel clock to 51MHz with REG_PCLK_2X set to 0 and now the flipped image is fine.
But this dropped the frames/s as well and the pixel-clock is now well below the minimum of 66.3MHz that is listed in the datasheet.

I set REG_PCLK_2X to 1 while still using 51Mhz -> image is distorted when flipped.
I set REG_PCLK_2X to 0 while using 72MHz -> image is fine.
I set REG_PCLK_2X to 0 while using 66MHz -> image is fine.

Any more advice on this why REG_PCLK_2X = 1 with REG_ROTATE = 1 leads to a distorted image?

At 72MHz pixel-clock with 72Mhz system clock the datasheet says that REG_PCLK_2X needs to be set to 1.
And 66MHz is out of spec for the panel, although barely, it is not possible though to set PLL2 to anything between 66MHz and 72MHz.

I reduced the pixel clock to 38MHz and it still works, here at my desk.
But there is no way to tell what will happen out in the field with -20°C....+60°C.

5
Discussion - EVE / What happens when using invalid serial data?
« on: January 05, 2024, 08:37:43 AM »
The "Serial Data Protocol" has three valid combinations for the start of a communication defined:

0 0 - Host Memory Read
1 0 - Host Memory Write
0 1 - Host Command

What happens though in the FT81x / BT81x if the first two bits are 1 1?
Is the byte discarded as invalid and the next byte used as actual start of the frame?
Or is the complete frame discarded as invalid?

Could 0xc0 0x00 0x00 0x00 used for cmd ACTIVE?
Could 0xc0 0x30 0x20 0x00 used to read REG_ID?

Edit: I was too curious to not try this although doing undocumented things does not yield reliable results.
I changed my host command implementation by sending out an extra byte first - unfortunately this does not work at all,
the screen stays black.
Adding a trailing byte after the host command works though, so at least these could be using 32 bit transfers.
My "issue" is with the 24 bits for Host Memory Read/Write though.

6
Discussion - EVE / BT882/BT883?
« on: December 03, 2023, 03:01:49 PM »
I received a newsletter from Bridgetek on my work account that indicated that BT882 and BT883 are released, but I can not find any specifics for these.
Am I correct to assume that these are memory reduced variants of FT812 and FT813?
So like BT880 and BT881 but with 24 bit RGB interface?

Or are these BT815/BT816 or even BT817/BT818 with reduced RAM_G?

I very much prefer BT81x over FT81x for mostly three reasons, UTF-8 fonts, external Flash interface and ASTC compressed images.
And it seems like at least having ASTC would be a good idea when the size of RAM_G is reduced to a quarter.

On a slightly related note, do you have a list of display modules that are available for end users from different manufacturers?
I could probably compile such a list, but I am always on the lookout for something new to support with my library.

7
Test and Review Area / EVE Asset Builder 2.10.2
« on: October 13, 2023, 06:39:19 PM »
I just found that EAB 2.10.0 was released.

I went across it, converted images, verified images, converted a font, put that font in a flash container, packed that flash container with the asset compressor, converted the resulting .zopfli file with the BIN2C tool.
And this went very smoothly. :-)

I found one small issue though.
When converting fonts, the "Input Character:" file selection gets cleared every time a new font is selected.

Edit: just found 2.10.1 and the bug is still in while this post is still missing approval.
Edit2: and I just found 2.10.2 which is dated 2023-11-10.

8
Discussion - EVE / image decoding and OPT_RGB565
« on: September 03, 2023, 09:33:21 AM »
I received an image file to conduct a test with and this image file is a .png.
Long story short, the image gets decoded to ARGB4 and not RGB565.

There is OPT_RGB565 in chapter 5.9:
Decode the source image to RGB565 format - CMD_LOADIMAGE

And the first idea I had was to provide this option in order to make CMD_LOADIMAGE
decode the .png file to RGB565.
But then I saw that the value for the option is actually zero, so this "option" does not actually do anything,
this is just the default value, this is !OPT_MONO.
As I was already using CMD_LOADIMAGE with bit 1 of the options cleared, this "option" OPT_RGB565 has no effect on loading PNG images.

Please consider removing OPT_RGB565 from the table in chapter 5.9.

9
Test and Review Area / EVE Asset Builder 2.9.0
« on: August 17, 2023, 06:02:33 PM »
I downloaded and installed EVE-Asset-Builder-setup-2.9_rc1.zip and I have an odd issue.

The button to open the explorer window to select the output folder is not working for me in "Asset Compressor" / "Compress".
When I use the button on the second tab "Validate" though it works, I can select the output folder, I have to confirm twice and
now the output folder is also changed on the "Compress" tab.

10
Discussion - EVE / Cake?
« on: August 15, 2023, 04:58:17 PM »
I just realized, it has been 10 years since the launch of the FT800.

11
Discussion - EVE / What is the purpose of CMD_REGREAD?
« on: May 21, 2023, 03:49:32 PM »
What is CMD_REGREAD supposed to be used for?
It does not seem to have any use when building a display-list and outside of display list handling it is more efficient to read from the address directly.

I am playing with EVE_cmd_regread() and EVE_memRead32() on a BT817 - the results are the same for the most part.

Code: [Select]
for(uint8_t index=0; index < 32; index++)
{
    test1[index] = EVE_cmd_regread(0x302000UL + (index*4));
    test2[index] = EVE_memRead32(0x302000UL + (index*4));
}

Some of the not documented registers seem to be pretty usefull, like 0x3021A8UL + 0x3021ACUL, I wonder why these are not documented.
Reading from the not documented REG_DATESTAMP returned a string: "2019-10-28_2.5.3"
Reading from for example 0x303000 returns 0xdeadbeef.
Reading from 0x309218 returns 3, whatever that means. :-)

Reading from RAM_JTBOOT (0x30b000) is returning inconsistent results between EVE_cmd_regread() and EVE_memRead32(), not like EVE_cmd_regread() is executed with higher privilege, more like what is returned for this memory region is not actually accessible for both functions.

The region from 0x309000 to 0x30914e has a few documented registers like REG_TRACKER and REG_FLASH_SIZE,
it is not mentioned in the memory map though, "Table 5-1 BT817/8 Memory Map".


I also had a look at the code for BRT_AN_025.
The functions EVE_CMD_REGREAD(), EVE_CMD_GETPROPS(), EVE_CMD_FONTCACHEQUERY(), EVE_CMD_GETIMAGE() and EVE_CMD_GETPTR()
are not implemented to do anything usefull and all these write out the parameters to EVE that are return parameters.
There is EVE_LIB_GetProps() though.

EVE_CMD_PCLKFREQ() does write the parameter "factual" although this is a return parameter.
EVE_CMD_FLASHFAST() does write the parameter "result" although this is a return parameter.
EVE_CMD_MEMCRC() does write the parameter "result" although this is a return parameter.

12
Discussion - EVE / CMD_CLEARCACHE with not empty display list
« on: April 27, 2023, 09:56:08 PM »
I am experimenting with making EVE cry in order to test recovering from co-processor faults.

And this might be one for the Bridgetek bug-tracker.
It takes over 12ms from issuing CMD_CLEARCACHE to getting a co-processor fault.
When reading REG_CMDB_SPACE 12ms after CMD_CLEARCACHE is done the result is 0x0FF8.
When reading REG_CMDB_SPACE 13ms after CMD_CLEARCACHE is done the result is 0x0FC3.

In contrast I am getting a co-processor fault after 20µs when issuing EVE_cmd_setscratch(43), did not check how fast actually.

I do not have an issue with CMD_CLEARCACHE, for one it is documented that the display list needs to be empty, my function EVE_cmd_clearcache() clears out both of the display list before issuing CMD_CLEARCACHE and then I can not recall that I ever used this command.
I just found this peculiar and perhaps this is something worth looking into.

13
Discussion - EVE / CMD_PCLKFREQ requires the flash BLOB?
« on: April 15, 2023, 08:37:54 AM »
I just found this in BRT_AN_033 BT81X Series Programming Guide version 2.3 which was not there in the previous revisions:

Important Note:
When using this command, the flash BLOB is required in order to ensure that the calculated PLL2
setting remains within the specification of 228MHz. Therefore, before using this command, ensure
that the following steps have been taken:
- External Flash chip connected to the BT817/8
- External Flash chip has the BLOB installed in the first 4096 bytes beginning at 0
- External Flash chip has been set to full-speedmode

Is this an editorial error?

I have been using CMD_PCLKFREQ in my init from the very beginning when the documentation for the bits in REG_PCLK_FREQ was not correct.
I have never set the flash to fullspeed mode before using CMD_PCLKFREQ.
Also the the flash was empty for at least the first tries of bringing up a new BT817 module.
It works just fine this way.

What dependency is supposedly between the external flash chip and the PLL2 for the pixel clock?



And I just did what I guess was a bit overdue, I calculated all possible frequencies for the pixel-clock
that can be setup with PLL2 thru writing to REG_PCLK_FREQ.

REG_PCLK_FREQ[11:10] is the range for the PLL2 frequency and not part of the calculation, my guess this is used for validation.
00: 20 – 40 MHz
01: 40 – 80 MHz
10: 80 – 160 MHz
11: 160 – 228 MHz

REG_PCLK_FREQ[9:4] is multiplied by 12MHz and the resulting PLL2 frequency must not be higher than 228MHz,
so the effective range for this 6 bit value is 1 to 19.
I really hope this value can go a couple of steps higher in a future device.

REG_PCLK_FREQ[3:0] is the divider and the pixel clock is calculated with this formula:
PCLK frequency = PLL2 frequency / REG_PCLK_FREQ[3:0] / 2
This makes the useable range for this 4 bit value to go from 1 to 12, at least is unlikely that higher values are of use.
The pixel clock must not be higher than 96MHz.

I put it all in a spreadsheet and sorted it by pixel clock.
These are the top values:

11   10   9   8   7   6   5   4   3   2   1   0         Range   Frac9:4   Frac3:0   PLL2 Freq   PCLK Freq
1   1   0   1   0   0   1   1   0   0   0   1   3377   D31   3   19   1   228   114,000
1   1   0   1   0   0   1   0   0   0   0   1   3361   D21   3   18   1   216   108,000
1   1   0   1   0   0   0   1   0   0   0   1   3345   D11   3   17   1   204   102,000
1   1   0   1   0   0   0   0   0   0   0   1   3329   D01   3   16   1   192   96,000 x
1   1   0   0   1   1   1   1   0   0   0   1   3313   CF1   3   15   1   180   90,000 x
1   1   0   0   1   1   1   0   0   0   0   1   3297   CE1   3   14   1   168   84,000 x
1   0   0   0   1   1   0   1   0   0   0   1   2257   8D1   2   13   1   156   78,000 x
1   0   0   0   1   1   0   0   0   0   0   1   2241   8C1   2   12   1   144   72,000 x
1   0   0   0   1   0   1   1   0   0   0   1   2225   8B1   2   11   1   132   66,000 x
1   0   0   0   1   0   1   0   0   0   0   1   2209   8A1   2   10   1   120   60,000 x
1   1   0   1   0   0   1   1   0   0   1   0   3378   D32   3   19   2   228   57,000 x
1   0   0   0   1   0   0   1   0   0   0   1   2193   891   2   9   1   108   54,000 x
1   1   0   1   0   0   1   0   0   0   1   0   3362   D22   3   18   2   216   54,000
1   1   0   1   0   0   0   1   0   0   1   0   3346   D12   3   17   2   204   51,000 x
1   0   0   0   1   0   0   0   0   0   0   1   2177   881   2   8   1   96   48,000 x

The first three are not valid as these are above 96MHz.
The lines with the "x" at the end are also found in the table 4-11 of the BT817/8 datasheet.

This is a bit of a surprise for me as I went the first time thru this, there are very few frequencies to choose from above 60MHz.
Totally plausible when put in a table like this.

I was feeding CMD_PCLKFREQ with 71MHz for the 1280x800 displays.
And now I see that this is not even possible and the result likely was 72MHz.
The reason why I even looked into this is that the 10.1" panel with 1280x800 that I am trying to add a configuration for
is using a pixel clock of 72.4MHz (typical).
Ok, no problem, 72MHz it is.

I went with using CMD_PCLKFREQ as my first calculations with the previously incorrectly documented bits for REG_PCLK_FREQ got me nowhere.
And using CMD_PCLKFREQ did not only work, it looked like it allowed more flexibility over the apparently select "few" values
for REG_PCLK_FREQ in the datasheet.
Now I will remove the call to CMD_PCLKFREQ.

And as a final thought, these are the values if the PLL2 frequency would be allowed to go up to 480MHz:

   Range   Frac9:4   Frac3:0   PLL2 Freq   PCLK Freq
E02   3   32   2   384   96,000
DF2   3   31   2   372   93,000
DE2   3   30   2   360   90,000
DD2   3   29   2   348   87,000
DC2   3   28   2   336   84,000
DB2   3   27   2   324   81,000
E83   3   40   3   480   80,000
DA2   3   26   2   312   78,000
E73   3   39   3   468   78,000
E63   3   38   3   456   76,000
D92   3   25   2   300   75,000
E53   3   37   3   444   74,000
D82   3   24   2   288   72,000
E43   3   36   3   432   72,000
E33   3   35   3   420   70,000
D72   3   23   2   276   69,000
E23   3   34   3   408   68,000
D62   3   22   2   264   66,000

The granularity is only a little higher so "just" allowing the PPL2 to run much higher does only achieve very little.

Adding a pre-scaler to bring down the 12MHz to a lower value before it is fed into the PLL2 would be much simpler to implement,
under the assumption that the multiplier already works all the way up to 63x.
So I kind of wish now that a future device would feature a clock pre-scaler for PLL2.  :)

This is the top of the table with a pre-scaler of 4 so the PLL2 gets 3MHz as input frequency:

   Range   Frac9:4   Frac3:0   PLL2 Freq   PCLK Freq
FF1   3   63   1   189   94,500
FE1   3   62   1   186   93,000
FD1   3   61   1   183   91,500
FC1   3   60   1   180   90,000
FB1   3   59   1   177   88,500
FA1   3   58   1   174   87,000
F91   3   57   1   171   85,500
F81   3   56   1   168   84,000
F71   3   55   1   165   82,500
F61   3   54   1   162   81,000
F51   3   53   1   159   79,500
F41   3   52   1   156   78,000
F31   3   51   1   153   76,500
F21   3   50   1   150   75,000
F11   3   49   1   147   73,500
F01   3   48   1   144   72,000
EF1   3   47   1   141   70,500
EE1   3   46   1   138   69,000
ED1   3   45   1   135   67,500
EC1   3   44   1   132   66,000

14
Discussion - EVE / Reading BT815 font metrics
« on: February 20, 2023, 06:38:03 PM »
I am playing with reading the BT815 font metrics and the results do not match the "Table 4-8 ROM Font Table" in version 1.2 of the BT817/BT818 or version 1.0 of the BT81x datasheet.
For font 28 I get L4/9/18/25 while the datasheet has L4/9/19/25.

Now table 4-9 lists a width of 19 pixels for "@" and "M" and the width value I am reading from the table is indeed 19.
For "W" I get a value of 18, for "R" I get a value of 13 and both match table 4-9 as well.

There seems to be at least a bug with rom_font.pixel_width of font 28?

15
Discussion - EVE / API inconsistencies
« on: October 31, 2022, 11:17:01 AM »
As I am going thru the MISRA-C report for my library I am finding API inconsistencies.

CMD_BITMAP_TRANSFORM
The given C prototype has "uint16_t result" as last parameter.
While this by itself is not correct and "result" should either be the return value or a pointer,
the description for result is:
"result return. Set to -1 on success, or 0 if it is not possible to find the solution matrix."

Which one is it, uint16_t or int16_t?
And actually the native type for RAM_CMD would be uint32_t.

Pages: [1] 2 3