BRT Community

General Category => Discussion - EVE => Topic started by: Jonathan on January 03, 2024, 09:59:11 AM

Title: Can BT815 determine the Touch-Controller Type by itself?
Post by: Jonathan on January 03, 2024, 09:59:11 AM
Hi,

I have a project where some displays are with goodix touch controller and some are with FocalTech touch controller.
Is it possible that the BT815 figures out which controller is used by itself?

Best
Jonathan
Title: Re: Can BT815 determine the Touch-Controller Type by itself?
Post by: Matrix Orbital on January 18, 2024, 09:46:38 PM
Jonathan,

If you would consider using out displays, all of our 3.5" to 7" use the GT911 touch, we decided to keep it simple and standardize our touch controllers.
Title: Re: Can BT815 determine the Touch-Controller Type by itself?
Post by: BRT Community on January 19, 2024, 02:09:28 PM
Hello,

Thank you for your query.

I have a project where some displays are with goodix touch controller and some are with FocalTech touch controller.
Is it possible that the BT815 figures out which controller is used by itself?

Unfortunately the BT81x series cannot automatically detect which type of touch controller is connected.
The Goodix and FocalTech controllers utilise different I2CX addresses which must be configured via the REG_TOUCH_CONFIG register.

Best Regards,
BRT Community
Title: Re: Can BT815 determine the Touch-Controller Type by itself?
Post by: Rudolph on January 22, 2024, 07:17:13 PM
I had an idea to find out which CTPM is attached, but it is not working.
It should take longer to reset when REG_TOUCH_CONFIG is set to 0x0380 for Focaltech but a Goodix CTPM is connected.

EVE_memWrite8(REG_CPURESET, 2U);        /* reset touch controller */
// EVE_memWrite16(REG_TOUCH_CONFIG, 0x05d0U); /* switch to Goodix CTPM  */
EVE_memWrite16(REG_TOUCH_CONFIG, 0x0380); /* switch to Focaltech CTPM  */
EVE_memWrite8(REG_CPURESET, 0U);        /* clear all resets */
EVE_memRead8(REG_CPURESET);

Checking back with the logic-analyzer, this first read results in 0x00 already.
At 400kHz it takes at least 25µs to get the first ACK from an I2C chip.
From writing REG_CPURESET to reading it back my code needs less than 10µs,
so the touch controller is not actually resetting.

Well, I noticed that the touch-controller takes longer to come out of reset on power-up.
I modified my startup code to immediately read REG_CPURESET after REG_ID returned 0x7c
and to read REG_CPURESET with no pause over and over again untill it reads 0x00.

RVT50HQBNWC00-B with ILI2132A: ~50µs
EVE3-50G with GT911: ~9ms (touch controller not found on power-up)

So that really looks like a way to check if the expected CTPM  is connected.

But how is the touch controller convinced to actually do a reset if writing 0x02 to REG_CPURESET does not work?
Title: Re: Can BT815 determine the Touch-Controller Type by itself?
Post by: BRT Community on January 23, 2024, 03:35:01 PM
Hello,

But how is the touch controller convinced to actually do a reset if writing 0x02 to REG_CPURESET does not work?

Let me liaise with the IC team on this point, but I believe that writing 0x02 to REG_CPURREST will only reset EVE's touch engine and it wont perform a reset of an attached CTP.


Best Regards,
BRT Community
Title: Re: Can BT815 determine the Touch-Controller Type by itself?
Post by: Rudolph on January 23, 2024, 06:23:05 PM
I really meant how to reset EVEs touch engine and not the CTPM.
It does not seem to reset when writing a 2 to REG_CPURESET or at least there is no delay between writing 0 to REG_CPURESET and reading back 0 from REG_CPURESET.
And I tried to just write 2 to REG_CPURESET - it does not return to 0.
Title: Re: Can BT815 determine the Touch-Controller Type by itself?
Post by: BRT Community on January 25, 2024, 11:43:37 AM
Hello,

I have had an update from the developers on this and they have noted the following:

Quote
When writing 0x02 to REG_CPURESET: the touch engine processor will point to the initial code address for touch firmware and will stay there until the MCU writes 0x0 to REG_CPURESET. To perform a full reset of the touch engine (registers etc), the MCU can send SPI command RST_PULSE (0x68,0,0) to EVE.

Note: the RST_PULSE will reset everything inside VC core, including the display engine, touch engine and audio engine.

In this case writing 0x02 to REG_CPURESET does not achieve a full reset of the touch engine, it instead restarts the touch FW.

Best Regards,
BRT Community
Title: Re: Can BT815 determine the Touch-Controller Type by itself?
Post by: Rudolph on January 25, 2024, 07:19:52 PM
Well, I guess I can measure the time the touch engine needs during startup, my init already waits for REG_CPURESET going to Zero anyways.
I have no solid idea yet on what to name a function that asks for this information though.
Something like EVE_touch_engine_????() which returns E_OK when a counter was lower than perhaps 10 and
something like E_CTPM_MISMATCH when that counter was above 10.

I have no idea what happens with resistive touch, I am not even sure if I have a FT81x / BT81x  module with resistive touch.
Should be a rather short delay as well.

Suggestions?