-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32-S2 with Riverdi RiTFT - WDT IDLE / Backlight PWM #117
Comments
Hello,
Espressif is doing too many variants. :-)
So BT815, I do have a a RVT5UQBNWC01 and looking at EVE_config.h I wonder why EVE_RiTFT50 is tagged as "untested".
That is something I occasionally fight with as well, most of all because Espressif keeps changing the ESP-IDF.
No, it is only initialized once: static int32_t rotate = 0;
Phew, that one is on Riverdi then. However, I just checked my RVT5UQBNWC01 and it is populated with a 5 pin chip that is marked with "MU86". Thank you, I will fix that! |
I wonder what have they done this time -_-
Ah interesting, thanks for pointing that out. That's a useful tool.
No problem, glad I could help! |
I tried using an ESP32 with a RVT5UQBNWC01 / EVE_RiTFT50 now. Next I grabbed a BPI-Leaf-S3 and working backwards all three panels just worked. Listing the dependencies: Libraries And that is at least the latest release of Platform espressif32. So this is using ESP-IDF version 5 and since it is a bit outdated it really should not give any new issues. As I tested with the already changed EVE_config.h I set the backlight-frequency back to 4000 in platformio.ini. |
Hi Rudolph, Thanks for looking into this.
All of my packages are identical with the exception of the riscv32-esp and xtensa-esp32s2.
I figure this has something to do with using an S2 rather than S3. However I have found a solution, I followed suggestions to use the following to "feed" the idle task. This satisfies my need for now, without disabling it altogether, but I'm unsure why the idle task is timing out every 5s when TFT_display() should run every 20ms. I will try moving the function to an RTOS task using "xTaskCreatePinnedToCore" instead, see if that resolves it. I wonder whether the difference in our results revolves around the fact that the S3 is dual core whereas the S2 is single.
Different frequency for their EVE4 range, I did read something about that on their website now I think about it. Good find! Unfortunately I've found Riverdi's tech support awful so far and they've discontinued their "Hermes" USB to SPI dev board which we need for writing to NOR flash via an EVE3. We're looking at moving over to Matrix Orbital, the only negative being delivery from Canada. |
I just ordered a S2 mini board as it was cheap on Amazon with delivery tomorrow. I then cleaned out older packages manually from .platformio/packages. Next I added an entry to my platformio.ini:
It compiles fine on first try, sort of. I really have no idea why it is suddenly required to configure the memory settings instead of using the board configuration. The module I ordered is advertised with "2MB PSRAM" which would require it to be populated with a ESP32-S2FN4R2. A different toolchain is used to compile: Well, now I have to wait for the board to check how it behaves.
I checked their library on Github and they are using 4kHz for all EVE modules.
Oh, I guess this makes sense from their perspective as the EVE4 modules have this mostly undocumented extra connector for factory writing the flash. EAB has the option to use a Raspberry Pi Pico and I have one wired here to an adapter board.
Yeah, this, I like Matrix Orbital as a company, met the owner and one of the developers a few years back at the Embedded World in Nürnberg, I have used a couple of EVE2 and EVE3 modules. There are other options as well, such as Crystalfontz and Panasys. |
I recently discovered this trick too, it was the only way I could find to silence the complaints when upgrading from esp-idf 6.4.0 to 6.5.0.
I have this message too, notice it says flash memory - I think it's referring to the flash storage not PSRAM. "CONFIG_ESPTOOLPY_FLASHSIZE_2MB" in sdkconfig
Again, interesting. I've tried to force an update and it insists I have the latest. I'll keep trying.
Good to know, unfortunately we (as a company) might have to take the hit on import taxes for now. We need to rely on their specified lead times and will be taking the speaker / resistive touch screen / 32MB options which aren't so easily available. We've ordered a couple of the newer EVE-USB2SPI-KIT-B which are capable of supplying the high backlight current required by IPS 7" - 10" displays. In our investigations we noticed that the pinout for Riverdi and Matrix Orbital is identical (as long as your backlight supply is 3.3V), and therefore we might be able to use the EVE-USB2SPI interface to flash the Riverdi NOR flash. In any case, all these devices do is set the EVE to become a 'dumb' SPI buffer so that the incoming SPI can talk to the flash instead. At least, as far as I can tell! |
That is not the ESP-IDF version, that is the version of platform-espressif32. Platform-Espressif32 might be needing an update.
Yes, sure, this is the flash-memory, I only wonder why I need to configure this at all when we already have a board
I am ordering for the company from Digikey and Mouser as well.
Yes, true, I would never again use resistive touch though and the price difference between 32mbit and 128mbit is not high enough for me to be concerned about as I am ordering units, not pallets. :-)
I really hope this is not an issue anymore since EAB should not switch on the backlight anymore in order to just flash the external memory on the module.
I definately can confirm this and at least the smaller EVE4 panels from Riverdi are fine with 3.3V for the backlight.
I just connected my EVE-USB2SPI-A to my RVT50HQBNWC00-B, used EAB in MPSEE mode and it worked just fine detecting the flash.
No, not really, it uses the co-processor API like one would from a micro-controller. And when you are "only" using 32mbit you could put the flash image in an ESP32 with a big flash and turn that into a production programmer. I am usually too lazy to connect the EVE-USB2SPI-A, the Hermes board or the PiPico as this would require me to disconnect my controller board and re-connect it later on. |
The S2 mini board arrived. And it just works with no changes to my main.c. As usual with ESP32, I have no idea what the heck all the memory is used for, but then it really has plenty of it. Edit: this board really is a bit strange, I need to press reset to start the software, plugging it into the USB is not enough. |
Excellent news, I'll await my tool and keep my fingers crossed that it works without a hitch.
I'm beginning to think the difference is due to our use of ESP-IDF with Arduino as a component (framework = espidf, arduino). I've disabled the WDT for now while I'm playing with the EVE APIs, layouts etc. It turns out we won't be using an S2 for this project anyway, it will end up being a dual core ESP32 or ESP32-S3. Also the full project uses interrupts and timers to drive tasks so I think this problem will resolve itself once we've integrated everything.
That is annoying I agree, we've found that with the Wemos D1 Mini development board too. |
Oh, so you are using Arduino, I was avoiding to use it. :-) For Arduino ESP32 there are two modes available in my library. When the macro EVE_USE_ESP_IDF is defined the SPI is using the ESP-IDF directly including DMA transfers for the "burst"-mode, at the cost of not being compatible with the Arduino SPI class. |
This is where our use of Arduino features gets a bit unusual. We don't use the setup() and loop(), we intialise and then use the esp-idf RTOS to create a while(1) task. Our current display uses the TFT_eSPI library which requires Arduino libraries, as well as some IC libraries which use the Arduino SPI. It might be that we move away from Arduino SPI in the future, at the moment our tft_init looks like this and it works great:
|
Ah ok, so your task needs to yield eventually, just like I am using vPortYield(); in the main loop in the ESP32 ESP-IDF example.
To my experience, the ESP-IDF implementation of SPI is rather slow, especially for smaller transfers needed to use with extra chips like DACs. |
I just noticed that there was an update, platform-espressif32 is now at version 6.6.0. |
Hi Rudolph,
Firstly many thanks for these code libraries, they're really helpful to anyone building projects/products using EVE displays.
I'm working on a project which uses an ESP32-S2 with a Riverdi RiTFT70 display. I used your ESP32 example PIO project and swapped the board config to use my custom ESP32-S2 .json file.
The screen loads just fine when I use the RiTFT50 build flag, which is maybe something to consider updating. My issue is that once the display list has been loaded the Idle task WDT is triggered. Using taskYIELD() or other refactors of this in the while(1) loop doesn't seem to help.
Also there's a gap in my understanding because as far as I can tell the TFT_display function is being called every 20ms and each time it is called the "rotate" is initialised to 0. Rotation is happening normally (I forced tag = 10 as I don't have a touch screen), but how is this so if rotate is being set to 0 every time the function is run?
On a separate subject, your standard PWM frequency for the Riverdi EVE3 backlight is 4kHz, I contacted Riverdi (because
I was getting a 4kHz squeal from the IC) who told me the ICs they use for EVE3 are CAT4238 or CAT4139. On the datasheets it states 100 - 2kHz. I recommend 200Hz as a default as this is barely audible.
The text was updated successfully, but these errors were encountered: