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 - raffaeler

Pages: [1]
1
Discussion - EVE / Re: Drawing arcs and circles
« on: March 23, 2023, 03:11:18 PM »
Yes, ESP32 does support the trig functions, thanks

Another (slightly unrelated) question. Do you have an example to fill polygons (with a mix of convex/concave points)?
I found posts in this forum using the stencils, but when there is an irregular shape, the filling process fails somewhere as this snippet shows:

Code: [Select]
CLEAR(1, 1, 1)
SAVE_CONTEXT()
LINE_WIDTH(32)
COLOR_RGB(255, 255, 0)
STENCIL_OP(INCR, INCR)
COLOR_MASK(0,0,0,0)
BEGIN(EDGE_STRIP_L)
VERTEX2F(7232, 2848)
VERTEX2F(5984, 5344)
VERTEX2F(8272, 4144)
VERTEX2F(10496, 4944)
VERTEX2F(9760, 1504)
VERTEX2F(5920, 1504)
VERTEX2F(7232, 2848)
END()

STENCIL_OP(KEEP, KEEP)
COLOR_MASK(1,1,1,1)
STENCIL_FUNC(EQUAL, 1, 255)
CMD_GRADIENT(655, 38, 0x0000FF, 348, 416, 0xFF0000)


2
Discussion - EVE / Re: Drawing arcs and circles
« on: March 23, 2023, 10:31:10 AM »
Gentleman, thank you all for your answers.
I looked into the FTDI code to create arcs and, while it is certainly more efficient, it has a lot of dependencies and it's hard to pull off from the Screen Designer.
I played a bit with filling convex and concave polylines with weird results. Unfortunately there are not examples explaining well how to use them.

I will try using the scissors but it's a painful process. This is going to be a far too expensive development for this project.

3
Discussion - EVE / Re: Drawing arcs and circles
« on: March 17, 2023, 05:07:48 PM »
Great work!
Initially I tried to use the Gameduino library because it looked a very neat and good way to work.
But moving it to a plain ESP32 looked like a lot of work, but I may have missed something.
There are ports on Github but they are quite old and not sure about their validity.
How difficult was your port?
Thank you

4
Discussion - EVE / Re: Widgets
« on: March 10, 2023, 05:30:40 PM »
Currently the approach to generate custom widgets is to code them individually into custom functions (this is the approach ESD uses) using the inbuilt primitives or co-processor functions.

Is there any documentation on this approach (without using ESD)?

Thank you

5
Discussion - EVE / Re: Flashing BT815 from ESP32
« on: March 08, 2023, 04:54:41 PM »
Quote from: Rudolph
Ok, now I got 1 / 1 on coldstart and it does not go away with a reset of the controller.
I can not reproduce it though, the next coldstart it is 2 / 2 again.

So there is something there, I only can not reproduce it reliably.
Maybe some race condition that somehow locks up the QSPI of the flash chip?

This is exactly the issue I see. Thank you for testing.
I don't believe there is a race condition. Apparently in the oscilloscope I see the correct traffic.

Anyway, it looks like a timing issue. It may depend on the SPI being too fast. When I tested the SPI code I could see the display I had to slow down some requests/responses. Unfortunately there is no better documentation to diagnose the issue. The timing diagrams are pretty basic.


Quote from: Rudolph
I added three more EVE_init_flash() after the first in between in hope I get a 1 / 2 with maybe on the third EVE_init_flash()
that the flash starts working somewhere alone the lines.
But nothing, does not happen anymore, not after 2 seconds cold or 2 minutes, also not when bringing down the current from the bench PSU
to close what the dispay draws.

I triggered it with a little under-voltage which probably did odd things to  my backligh-supply.
And the repeated calls of EVE_init_flash() do nothing.

Now I added a delay of 100ms before calling my EVE_init() function and it works even with the PSU voltage lower than
my backlight voltage.

So at least what I get here looks like a supply issue, bringing EVE out of reset before the voltage rails are stable.

I did check the voltage on the board and it's good and stable over time.

6
Discussion - EVE / Re: Widgets
« on: March 08, 2023, 04:47:15 PM »
Quote from: BRT Community
Have you chosen an MCU to use as a SPI master interface yet?

Thank you but I already developed my own ESP32 library and a decompiler to iterate in CI/CD.
I believe Rudolph understood my question. Substantially I would like to create my own widgets, upload them (in flash?) and then use them as I can do with the Button.
The reason for this is that I really miss primitives like Arcs and (unfilled) Circles.
I read the documents that you linked but they are not exhaustive and do not explain how to do this.
Is there any reason why BRT is not allowing to create custom widgets?


No, uploading functions for the command co-processor to execute and add lines to the display-list based on supplied parameters is not possible,
or at least there is no documented API for that.
And the few bits and pieces that I gathered about the undocumented API do not seem to allow this either.

Too bad, thanks for confirming.

What you can do is pre-calculate sequences of display-list commands, copy these from the display-list to RAM_G and then use CMD_APPEND to add these snippets into your display list.
Ok, this not not CMD_MYBUTTON but you can still reduce the SPI traffic significantly.
In my simple example code I am using this mechanism only to create a section of display list commands that never change, a colored rectangle on top, a line to separate things, a text in the middle and o logo.

Currently I am quite fine with the SPI speed. This was my starting point when I first wrote the code for ESP32. Anyway, thank you for the tip.

There also is CMD_NEWLIST / CMD_CALLIST which allows to write co-processor commands verbatim to RAM_G and execute this snippets during display list building.
The difference to CMD_APPEND is that you get for example cmd_button(20, 20, 60, 60, 30, 0, "OK!"); in RAM_G and not all the display list commands that the co-processor is generating from a widget command.

Sure, good point.

7
Discussion - EVE / Widgets
« on: March 06, 2023, 04:19:44 PM »
Hello,
how can I create, upload to the display (BT815) and call a widget?
Note: I can't use the ESD.

Thanks

8
Discussion - EVE / Drawing arcs and circles
« on: March 01, 2023, 08:22:06 AM »
Hello, I am on the BT815.
I can currrently draw concave polygons filled with a gradient, but not convex and I gave up on this.

I am currently looking for drawing arcs and unfilled/transparent circles. I found the Ft_Esd_ArcLine.c and Ft_Esd_CircleLine.c but the code has some obscure dependency.
Questions:
1. Is it possible to use the ESD widget outside the ESD environment? (i.e. loading in memory in some way and calling their code?)
2. Is there any other better way to draw arcs and circles?

Thank you

9
Discussion - EVE / Re: Flashing BT815 from ESP32
« on: March 01, 2023, 08:01:28 AM »
Quote
I am only using PlatformIO because I would not even call "Arduino IDE 1.x" an IDE and the 2.0 still has nothing that VSCode could not do better.

Look, I already wrote that Arduino IDE is not good, but I can't migrate the rest of the libraries just because of this. I have good reasons for this choice and I know what I am speaking of.


Quote
Hmm, I had an intern for the last two weeks and I gave him an Arduino UNO and an EVE3-50G to play with.
I took my current example and after a little convincing it ran in Arduino IDE 1.8.19.
He used my archive with Arduino IDE 2.0.3 on his own notebook and apart from that the "IDE" killed the project a couple of times it worked fine.

Oh sure, I can fork the library but then I have to maintain it and keep aligned.... better not.
As I wrote, I am already at a good develpment stage. I already have wrote my own decompiler to rebuild the exact sequence of the commands and a code generator that generates the code using my libraries. I am just trying to fill the gaps due to the very poor documentation.

Quote
Well, you still could use my library as a reference point.

Thanks, I did it, but I discovered that the issue was a poor flat cable.

Quote
Oh? When did this change?
When I implemented the ESP32 Arduino code back in end of 2020 it was really really slow.

I don't know. This is what I could see on the oscilloscope and that was confirmed by the ESP32 discord channel.

Quote
No, there is no need to put the flash thru the init state, it even should go thru the init automatically and reach BASIC state.

I am not setting the INIT state. After successfully flashing I read the state and it transitions to INIT without ever going to basic. If I then reboot, everything is ok and I can transition to FULL as well.


TIA

10
Discussion - EVE / Re: Flashing BT815 from ESP32
« on: February 23, 2023, 12:45:05 PM »
Update: I was able to reliably flash the display with the same code but changing cable.

Anyway, I always have to reboot the display (after flashing), otherwise the FLASH always stay in the "INIT" state and never changes.
How can I make the display flash transitioning from INIT to (at least) BASIC?

Is rebooting after flashing a mandatory action?

TIA

11
Discussion - EVE / Re: Flashing BT815 from ESP32
« on: February 22, 2023, 04:37:29 PM »
I was forgetting one important info.
I carefully observed with the oscilloscope the timings of the ESP32 SPI using both ESP32-IDF (with and without DMA) and the Arduino SPI for ESP32.
The results are:
- The native ESP-IDF performance is poor (even using transactions) because there are lengthy gaps between every transmissions.
- The Arduino SPI library is much way faster.
In the ESP32-IDF forums I was told that the Arduino wrapper does NOT use the IDF abstraction APIs but goes directly to the ESP32 registers. They also said that the IDF library is typically much slower because Espressif wants to provide a stable abstraction over future silicons.

12
Discussion - EVE / Re: Flashing BT815 from ESP32
« on: February 22, 2023, 03:28:43 PM »
Hi Rudolph, I could see your huge work (congratulations for that!).
Because of other integrations, I choosed not to work with PlatformIO even if I agree that the plain Arduino IDE is way too basic.
I tried to move your library to the plain Arduino and it was too tricky because of PlatformIO (compiler definitions are not supported by the Arduino IDE but only using the CLI).
Also, I am pretty much done. All I have to do is integrating the "low level" APIs with my own abstraction layer that allows to draw items using OOP and completely forget about commands and the underlying BT C APIs.

Everything works but I am trying to understand what does not work with flashing. Most of the issues I had is because of the very poor documentation. But after reading tons of posts here and examples, I am pretty sure that the code is ok (I also compared the flashing procedure to your code).

I was wondering why BT does not provide a clear documentation of these procedures. Even reading the BT IC datasheet I could not find exhaustive explanations.

Have you ever had problems with unreliable writing on the flash?
Thanks!

13
Discussion - EVE / Flashing BT815 from ESP32
« on: February 17, 2023, 02:41:14 PM »
Hello, after a long pain in making the BT815 work with the ESP32, I can now display commands and some bitmaps.
I now need to be able to update the flash from the microcontroller board.
To do that I started from this sample: https://github.com/MatrixOrbital/EVE3-BT81x-Flash/blob/master/process.c

Anyway, the flashing process does not work as expected.

Problem 1.
Apparently the flash procedure works correctly, but when I disconnect the display and connect to the PC, I read the flash content and there are "random" differences even at the very beginning (offset 0x58 for example). Since the transfer size is larger, there is apparently no space for some error in copying the buffer.
It tried to transfer into the RAM_G_WORKING blocks of 64, 256, 512 and 1K but nothing helps.
Does anybody have some clue?

Problem 2.
During phase boot I print the Flash status and sometimes I see it remains in the INIT status instead of BASIC. Any reason for that?

P.S. The SPI library is the official Arduino for ESP32.

Thank you

Pages: [1]