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 ... 17 18 [19] 20 21 ... 27
271
Are you trying to upcycle a Smartphone or Beamer display?
Please provide a datasheet link to such a display.


272
Discussion - EVE / Re: FT800 Bitmap Handles
« on: July 13, 2020, 05:01:09 PM »
While this should work I would also like to point you to CELL.
Either as command for VERTEX2F or as parameter for VERTEX2II.

With this you can combine icons of the same size into one binary.
For a project I combined 9 54x20 images into one image and converted it to L8 format.

Code: [Select]
#define MEM_BUTTONS 0x00005500 /* buttons, 54x180 L8, 9 cells , 9720 / 0x25f8 */
#define HANDLE_BUTTONS 5

/* somwhere in init() */
EVE_cmd_inflate(MEM_BUTTONS, buttons, sizeof(buttons));

/* part of the static display-list that is injected with cmd_append */
EVE_cmd_dl(BITMAP_HANDLE(HANDLE_BUTTONS));
EVE_cmd_dl(BITMAP_SOURCE(MEM_BUTTONS));
EVE_cmd_dl(BITMAP_SIZE(EVE_NEAREST, EVE_BORDER, EVE_BORDER, 54, 20));
EVE_cmd_dl(BITMAP_LAYOUT(EVE_L8, 54, 20));

/* part of the dynamically generated display-list */
EVE_cmd_dl(DL_BEGIN | EVE_BITMAPS);
EVE_cmd_dl(BITMAP_HANDLE(HANDLE_BUTTONS));
EVE_cmd_dl(TAG(10));
EVE_cmd_dl(CELL(1));
EVE_cmd_dl(VERTEX2F(46, 110));
EVE_cmd_dl(TAG(11));
EVE_cmd_dl(CELL(2));
EVE_cmd_dl(VERTEX2F(46, 175));

This has two advantages, first is it uses less of RAM_G for odd-resolution images, that is anything not divisible by 8.
And then the packed binary is smaller so it uses less space in your controller and is transferred faster over SPI.

Well, and yes of course you can easily change the icon on the fly, even use this for animations.

273
Discussion - EVE / Re: BRT81x blob and SPI RAM instead of Flash
« on: July 03, 2020, 05:04:54 PM »
I would apreciate a little information about these Blobs as well.
But mostly because I already found three SPI NOR FLASH chips that do not fully work with EVE.

And sure, the more options the better, MRAM could be intersting as well.

What would be the benefit of PSRAM though?

You already can use the FLASH as extension of G-RAM by storing for example images and glyph files for fonts
and directly use these from FLASH wthout moving them to G-RAM first.

PSRAM is volatile, so you have to write your data after every power down.
You would need to provide some other mass-storage device to load the data from.
Then the size is rather limited with 64MBit at best while you can get 256MBit FLASH even in the simple SOIC-8 packages.

Okay, there is one thing, you can write a lot faster to PSRAM than to FLASH.
But there is a catch.
First of all it is still rather slow at <20MB/s, more likely in the region of 10MB/s.
Where I do get my numbers from? Reading from FLASH currently works at about 10MB/s according to tests with quite a number of chips and Progflash.exe.

And then you only have one bus so writing to any external memory while at the same time displaying something should be in the best case a huge bottleneck for writing and in worst case almost impossible to implement for Bridgtek.
If your application is to dynamically store full sized bitmaps and switch between these you probably would either be disappointed how slow writing is or that the display is glitching out every time data is written.


Yes, the first 1280x800 displays are already anounced.
And a single "full" color 16 bit image would need 2 megs of RAM_G.
So the disparity between the size of RAM_G and the display resolution is getting worse.

It would be nice to see RAM_G expanded to 0x1fffffh.


But then we have ASTC now as well and displaying images in ASTC also works from RAM_G.
I just converted a 560x560 image to ASTC 8x8.
The uncompressed data in RAM_G has a size of only 78400 bytes.
As raw data this would be 627200 Bytes.
EVE quite happily displays that right now on an EVE3-50G here from RAM_G and also rotating it does work fine.

For the heck of it I grabbed a random image from the internet, it has 1400x792 pixels.
As ASTC 8x8 it needs 277200 bytes of RAM_G.
So I could almost put four of these monstrosities into RAM_G.

Edit: I also put the 1400x792 image into RAM_G now and EVE displays it at x = -300 and y = 65 while rotating it around its center. Zooming it by a factor of 1.456 at the same time while rotating it? No problem.

274
Test and Review Area / Re: EVE Asset Builder 1.6.0
« on: June 23, 2020, 03:32:03 PM »
I un-installed the older EAB and also removed the directory for it to make the installation of 1.6.0 as clean as possible.
First observation, EAB installs to C:\Users\Public\Documents\EVE Asset Builder now.

Flash Programmer:
The "Detect" button works now from the GUI, including "Measure Writing Speed".
After detect is finished it immediately switches over to "PROGRAM" though so you only have a second to read the result of the reading speed analyses.
There is a "BACK" button to get back to the detection results which works fine.
But I would prefer to select "PROGRAM" myself.
Annother issue is, when you use "DETECT", "BACK", "PROGRAM" and then "BACK" again, the results of the "DETECT" are gone.

For Progflash.exe the "detect" option is still undocumented and has been changed from the last version.
It requires an additional parameter now, "all" or "except_writing":
ProgFlash_1_6 MPSSE detect except_writing

In "PROGAM" we still do not have an option to verify the contect of the flash against a given file.
Instead we have "UPDATE&VERIFY" now which works just fine but is not the same thing.
The new version of Progflash.exe also does not have this option, or at least "Progflash module MPSSE verify flash.bin" does not do anything while "ProgFlash module MPSSE write flash.bin verify" and "ProgFlash module MPSSE update flash.bin verify" do work.
Can we please also have a non-destructive verify only option?

"ERASE" works a lot better now, it actively switches the FLASH to BASIC mode now if it is in FAST mode.
So I can erase the chips from the Adesto with EAB now but they still do not work with the provided unified.blob.


Annother observation, the commands used to play the logo animation at the end and they do not do this anymore.
I consider this to be a good thing since at least the two USB interfaces I have could not supply a larger panel since both only have a single 3.3V linear regulator on them.
However, all commands still end up to configure the BT81x to display an empty display list with a black screen and activated backlight at the end.
This is about the worst case possible as an all black screen means the display logic itself will draw the most power while this is not obvious to the user since the panel still is almost black.
I am only using a 4.3" module but the LDO still heats up.
Now take a 7" module that draws around 150mA for the logic alone when all black and 500mA or more or the backlight.
Not only is this beyond what a normal USB port allows, this means the LDO on the UBS/SPI interface needs to dissipate 1.1W of excess power.
And now consider that the near future will bringt 10" modules that will draw more power for the backlight and the logic.

Please do at least deactivate the backlight or even better also leave the panel logic in limbo set PCLK to zero.


Off to more testing...

275
That board is stuffed, wow. :-)

And as it is one of the more exotic modules I just added profiles for EVE3x-39A/EVE3x-39G to my library:
https://github.com/RudolphRiedel/FT800-FT813

The only deviation from your settings in the EVE3x-39-Manual.pdf is that I set the value for REG_PCLK to 7 instead of 5
as this results in 68 FPS @ 72MHz.

But as I just realize, the timing parameters on page 16 are not quite correct, or are they?
At least the HSIZE of 482 must be a typo.
And the HOFFSET of 16 seems to be really low, usually HOFFSET is about 4x at 480x272.
Plus HSYNC1 should be less than HOFFSET.

I would rather expect:
HSYNC1 = 41
HOFFSET = 43




276
Is it possible that you have a second init function somewhere else?
In your first example REG_PCLK should not have been written to and therefore the display should have stayed dark.
And now REG_PCLK is not written in the snippet shown and it still works?

Also the init is missing the basic display-list from the manual but this is not the issue.

277
Discussion - EVE / Re: EVE Asset Builder
« on: June 20, 2020, 06:51:24 PM »
Hello,

a month has passed and neither has EAB been updated or the questions been answered.
I really wonder why Bridgetek is moving so slowly.
Same applies to documentation.

Sure, quality control is important.
But especially EAB does not leave the impression with me that it has been thoroughly tested.
Let us help with that, put more stuff in the "Test and Review Area".

Best regards,
Rudolph

278
Discussion - EVE / Re: List of QSPI FLASH Chips for BT81x
« on: June 20, 2020, 05:53:35 PM »
Push.

Although I am all alone with this so far I added four more chips to the list that I just tested.
This time the first 256 MBit chips, Macronix seem to be the only company that manufacures these
in a  SOIC 208 mil package.

Oh, I also sorted the list and added the manufacturer as it was grown a bit now.

Most of the chips I have tested in the socket now, so I can retest these.
The test now is to connect a USB/SPI interface to my EVE3-43G and use progflash.exe from the command line:

progflash module MPSSE write flash.bin
progflash module MPSSE detect except_writing
progflash module MPSSE erase

Currently I am using the progflash.exe that was part of the EVE Asset Builder 1.6.0 RC1 archive, it identifies itself as "BT81X Flash Programming Utility v1.1".

279
This happens when you configure EVE for a smaller resolution than the display you have connected.
Like for example 480x272 when the display has 800x600.
And 480x272 is the reset default value.

What happens is that your init sequence is not executed.
Reading REG_ID directly after CMD_ACTIVE like shown will fail as the FT813 does not even respond then.

Check the init sequence in the programming manual.

Somehow REG_PCLK gets set regardless so this has to happen outside of the fragment you have presented.

280
I couldn't work out how the DMA would deal with the Modulo 4096 on the address it was writing to but with what you guys have described above, it isn't necessary. The DMA would just write to REG_CMDB_WRITE each time!!

Yes, the DMA does not have to deal with the Modulo 4096.
Yes, using REG_CMDB_WRITE for this works if you do not use a FT800/FT801.

But you still can write for example 1024 bytes of data with the DMA to RAM_CMD + 4080, this just works as the FIFO wraps around by itself.
The difference is that without REG_CMDB_WRITE you need to keep track of the offset in your programm and make
it wrap around to follow the FIFO, all my commands just do this now since regardless of DMA or not, after the command or the buffer is sent REG_CMD_WRITE needs to be written.

But yes, using REG_CMDB_WRITE instead is not only easier but also a little faster and takes less program-memory since you do not have to keep track of the offset anymore.
I have tested this now and this really is annother good reason to give up FT80x support.

One nice thing is that after transmitting the DMA buffer my end-of-dma interrupt now needs
to set REG_CMD_WRITE to make EVE start to process the buffer.
With REG_CMDB_WRITE the interrupt only raises CS and clears my dma-busy-flag.

281
Discussion - EVE / Re: Tag value of an area with content
« on: June 18, 2020, 06:34:18 PM »
though Rudolph's example also uses zero).

As zero is an invalid value and also the default CLEAR_TAG value, I just use TAG(0)
for objects I do not need touch events for.



282
Discussion - EVE / Re: Tag value of an area with content
« on: June 17, 2020, 05:25:00 PM »
Oh, annother thing, avoid tag values below 10, for some reasons these do not give reliable touch events.
Is this really true!?  If so, I have a lot of code to revise.

I am not quite sure.
I tested this the last time back in January with an EVE3-43G and before that found this behaviour with FT813.
At a tag-value of 1 the value was toggeling between 0 und 1.
At a tag-value of 5 the value was toggeling between 4 und 5.
At a tag-value of 9 the value was toggeling between 8 and 9.
Using other values was stable: 2, 3, 4, 6, 7, 8, 11, 15 and 19.
It was reproduceable, I had seen this before and I got a bug-report regarding this.

I just setup a new test with an EVE3-50G and the value is stable.
It just is freaking stable - as it should be.
No idea why, could not explain it back then either, just reading REG_TOUCH_TAG has a rather low potential for failure.

So well, ignore this, sorry.

283
Discussion - EVE / Re: Tag value of an area with content
« on: June 17, 2020, 10:22:24 AM »
You can use the same tag value for several objects.
In your case I would just use an rectangle with the background color and the other objects on top of that.

TAG(10)
COLOR_RGB(Background)
..rect..window-size
..bitmaps
COLOR_RGB(Text)
CMD_TEXT()
TAG(0)

I usually do this with sliders to make them more useable by increasing the touch-area.

Oh, annother thing, avoid tag values below 10, for some reasons these do not give reliable touch events.

284
Though, I'm still at a loss as to the benefit of doing so with the exception of suppressing updates to REG_CMD_WRITE.

There is no benefit to write to RAM_CMD + offset over writing to REG_CMDB_WRITE.
Well okay, it works on FT80x as well.

But what is REG_CMDB_WRITE actually meant to be used for?
In AN_390 we find this:
"To offload work from the MCU for checking the free space in the circular buffer, the FT81x offers
two auxiliary registers “REG_CMDB_SPACE” and “REG_CMDB_WRITE” for bulk transfers. It
enables the MCU to write commands and data to the co-processor in a bulk transfer, without
computing the free space in the circular buffer and increasing the address. As long as the amount
of data to be transferred is less than the value in the register “REG_CMDB_SPACE”, the MCU is
able to safely write all the data to “REG_CMDB_WRITE” in one write transfer."

Well, when I started to play with EVE back in december 2015 I was using a VM800B35A with a FT800.
So no REG_CMDB_SPACE.
But I also did not have the issue that led to implementing REG_CMDB_WRITE, I never had to "offload work from the MCU for checking the free space" as my library never did check the free space.
That is a concept that I decided very early on to not copy from the original FTDI driver.
I still remember that I was very surprised when I found out that the FTDI driver was reading REG_CMD_READ and REG_CMD_WRITE on every single command to calculate the free space in the FIFO.

My library still does not calculate the free space in the FIFO and I am also not using REG_CMDB_SPACE.
My EVE_busy() function does only read REG_CMD_READ and compares that with my own "cmdOffset" var that all my commands update and that gets written to REG_CMD_WRITE.

And this works just fine since the FIFO is always empty anyways.

At least when writing a chunk of data of <4k for a new display list every 20ms.

So my library already has very low overhead and it supports FT80x as well, so I never really had to change
it to use REG_CMDB_WRITE, I never had the problem that lead to implementing it.
And even less so since I started to use DMA to transfer the display list to the cmd FIFO.

I plan to drop FT80x support with 5.0 of my library and this will happen when I implement support for BT817/BT818.
Switching over to REG_CMDB_WRITE then should save a few addtional clock cycles per command, like <10 or so.
Hmm, the longer I think about this the more I know that I need to test this. :-)


What could potentially benefit from REG_CMDB_WRITE and REG_CMDB_SPACE would be CMD_LOADIMAGE.

2k at 8MHz is ~3ms. (calculated with 12 bits per byte to account for the pauses between bytes)
I did a test a while back with a FT813 and decoding a 3867 bytes .png took 53ms.
And decoding a .jpg with 3903 bytes took 480µs

So sending a 64k .jpg in 2k chunks would mean that this would take about 96ms,
the FIFO would always be empty for the second packet.
At a theorethical 80Mhz for the SPI the transfer would take less time than the decoding.
I am sending the data in chunks of 3840 bytes now so 64k would take 17 chunks and a few bytes.
With about ~5.8ms for 3840 bytes and 17 times waiting for 0.5µs this is about 107ms.

So that would shave off about 10ms and not even with 10 images of 64k this would really make a noticeable difference.
At least not when you only load the images once when starting the program.

I wanted to calculate that for .png as well but decided after a couple of steps to not do it fully. :-)
Using .png is not really a valid option in the first place, even less so since we got ASTC.

285
Discussion - EVE / Re: Using CALL and RETURN
« on: June 16, 2020, 12:58:30 PM »
No, I have not even tried to use CALL and RETURN since I only use the co-processor to build the display list.

But, have you checked the size of the resulting display list?
That RAM_DL is twice the size of RAM_CMD does not help when you run out of space in RAM_CMD since the resulting display-list
in RAM_DL that is generated from RAM_CMD is a lot larger as commands like CMD_BUTTON are generated with several display list commands.

Just mem-read-16 REG_CMD_DL before building a new list, that is the size in bytes of the previous list.

Or check what the EVE Screen Editor does.
Just putting 10 buttons on the screen fills up RAM_DL by 24%.
And when you click on the "Inspector" tab you see that 11 lines of Coprocessor commands get translated to 550 entries in the display list.
36 buttons and the display list is full.

So no, the RAM_CMD size usually is not the limiting factor.
At least not if you use widgets.

My debug output always lists both the RAM_CMD size and the RAM_DL size.
Well, okay, I also use CMD_APPEND but even without it you could fill up RAM_DL without filling RAM_CMD.

Pages: 1 ... 17 18 [19] 20 21 ... 27