BRT Community

General Category => Discussion - EVE => Topic started by: exatech on August 23, 2019, 04:06:35 PM

Title: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: exatech on August 23, 2019, 04:06:35 PM
Hi,
my board with BT815 is controlling a 7" PowerTip display that has a HY4635 capacitive touch controller. The display is OK, but the touch info is not.
I checked the I2C lines with an oscilloscope. The CTC issues an interrupt when touched, and the I2C lines show 1 byte with the address (0x38) and then halve a byte: after 4 clock pulses the clock remains low. Only when a new touch is made, the clock goes high again for the address byte.

Does anyone have experience with this CTC? Is it compatible with BT815?
thanks,
Henk
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: BRT Community on August 26, 2019, 10:59:24 AM
Hello,

The HY4635 is not listed as compatible with EVE, you will need to use Touch Host mode as describe in section 6.7 of the following:
https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/AN_336_FT8xx-Selecting-an-LCD-Display.pdf (https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/AN_336_FT8xx-Selecting-an-LCD-Display.pdf)

I believe enabling touch host mode for the BT81x aligns with the procedure for the FT81x series of ICs, but I will double check with the development team.

Best Regards,
BRT Community
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: aryelevin on December 18, 2019, 05:40:34 PM
Hi,

I'm also trying to use this CTP IC (HY4635) and no luck.
The reason why I'm not using host mode is that HY461x series have the same API so it should work without any issue.

Please froward me to the right direction on how to solve it.

My EVE chip is FT813Q

Thanks a lot
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: BRT Community on December 23, 2019, 03:34:33 PM
Hello,

One possibility is that the HY4635 may require clock stretching on the I2C interface, if this is the case it may be possible to support this with the FT813. You would be able to determine if clock stretching is required via a logical analyser capture of the I2C data.

Best Regards,
BRT Community
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: aryelevin on January 04, 2020, 09:59:03 PM
Hi,

After obtaining a logic analyser, I got the lines data, attached on the image here.

Can you please inspect them to see what's going on? (I'm not completely understands this, shame on me haha).

Thanks a lot
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: aryelevin on January 05, 2020, 07:31:56 PM
Hi,

After testing it connected directly to the MCU I2C lines it seems on the signals that it needs clock stretching.
It works perfect with a much slower clock (about 4 times slower - probably 100KHz vs 400KHz which the FT813 probably uses).
See the attached image with a slower clock when connected to the MCU.

Please follow me to the right solution on how to slow down the clock for the CTP I2C.

Thanks a lot
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: Rudolph on January 06, 2020, 05:13:19 PM
I2C clock stretching is something else, a way to pause the bus essentially, not reducing the base clock.
There does not seem to be a way to change the I2C clock speed directly.

But even then the HY4635 is a bit odd.
The registers are more or less compatible with the FT5x06 series and not at all with the HY461x.

Even with reduced clock the EVE still might not be able to use the HY4635.
There has to be a mechanism in place to identify the different supported chips and while the
touch registers for the HY4635 seem to be compatible with the FT5x06 at least, the chip-ID registers are not.

So unless Bridgetek supplies a patch like the one for FT6xx6 and Goodix for FT811/FT813, I am afraid that touch with the HY4635 will only work in touch host mode.
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: BRT Community on January 07, 2020, 01:34:03 PM
Hello,

Rudolph is correct in all of his assertions, the recommendation Is still to implement Touch Host mode for any touch controllers that are not listed as compatible.

We have previously provided the following work around for the HY4614 touch controller, but this is not guaranteed to work with the HY4635.

Code: [Select]
The following will change the FT81x I2C clock frequency:
 
-          Boot-up till read back REG_CHIPID=0x7c and REG_CPURESET=0
-          Write REG_CPURESET=2
-          Write RAM_JTBOOT + 0x1ac  (or 0x30b1ac)= 40  //change I2C freq to 57KHz
-          Write REG_CPURESET=0
 
The following edits were made within the “Gpu_Hal.c” file of 3 sample apps (APP_Graph, App_Gradient, App_Sketch) to implement and test these changes (see attached image)
 
Note: We found it necessary to add a 50ms delay before performing the register write to allow this to complete correctly.
 
You may notice that lines 1825-1829 have been commented out, this is to ensure that the application does not load any new touch configuration code (see AN_336 section 6.6.3).
Loading of new configuration code is only required for Goodix or Focaltech FT6xxx components, it is not required for Hycon or Focaltech FT5xxx parts.


Best Regards,
BRT Community
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: aryelevin on January 07, 2020, 02:11:13 PM
First of all, Thanks for everyone who's trying to help here, THANKS!  :-*

Now, to explain our situation:
We've already manufactured 100 PCBs (They're quite expensive duo to some components we use there) with the direct connection of CTP to EVE, and it was working great with our LCD module which used Goodix IC, but after increasing the outer glass thickness of our LCD Module for withstanding a vandalism of our product, we have to replace the IC to the HYCON one which supports this, so we now stuck.
In addition, a development round of handling the touch events on the MCU is quite a task for us now, and might delay our product launch, which we want to avoid of course.
So we need a solution to work around this issue.

Now to the point about the replies here:
1. It is definitely true that chip ID registers of the HY vs FT is not the same, BUT, It doesn't seems that EVE checks any registers about the chip ID, so this should be fine.
2. Thanks for the clarification about the clock stretching, but it seems that it don't needs clock stretching when running at about 100KHz (you can see the logics in my posts above), so this should be even better at 57KHz (fast enough for Touch input).
3. From my understanding the all HY families is compatible since their demo code links is directing to the same files, so I assume it should just the same, isn't?

Later today I will be on the office and will try the patch BRT supplied here, and will report back.

Again, I want to thank you all about your assistance.
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: Rudolph on January 07, 2020, 04:46:35 PM
We have previously provided the following work around for the HY4614 touch controller, but this is not guaranteed to work with the HY4635.

Very interesting. :-)

As this directly patches the touch controllers memory like the Goodix patch does, this will only work with FT811/FT813?
So it will not work with a patched FT813 or a BT815/BT817?

Not to ask what offset to use in these case, but to prevent someone else from trying. :-)
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: aryelevin on January 07, 2020, 07:09:42 PM
OK, so after applying this Hot-fix it just works.
I have to check it further about the responsiveness and few more characteristics to mark this as completely solved, but for now it seems just fine.

Tomorrow I will take care for the further testing.

Will report to you here.

Anyway, a great advance, so thanks for everyone.

BTW, there is a way to configure it to be around 100KHz instead 57KHz?

Warm regards
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: BRT Community on January 08, 2020, 01:52:18 PM
Hello,

When testing this we tried several different values for the clock speed and found that "Gpu_Hal_Wr8(phost, 0x30b1ac, 40);" to be the most suitable. Writing this to 20 would result in a I2C clock of 98Khz.

Best Regards,
BRT Community
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: BRT Community on January 08, 2020, 02:02:51 PM
We have previously provided the following work around for the HY4614 touch controller, but this is not guaranteed to work with the HY4635.

Very interesting. :-)

As this directly patches the touch controllers memory like the Goodix patch does, this will only work with FT811/FT813?
So it will no work with a patched FT813 or a BT815/BT817?

Not to ask what offset to use in these case, but to prevent someone else from trying. :-)

This write changes EVEs I2C clock, the reconfiguration does not have impact to other parts of FT81x. It only affects the I2C clock frequency for CTP communication.

If the AN_336 configuration code is downloaded to the FT811/FT813, then the following code shall be used to change the I2C clock:
Code: [Select]
Gpu_Hal_Wr8(host, REG_CPURESET, 2);
Gpu_Hal_Wr8(host, 0x30b17c, 40);
Gpu_Hal_Wr8(host, REG_CPURESET, 0);

I would need to clarify regarding the BT815/6.

Best Regards,
BRT Community
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: Rudolph on January 08, 2020, 03:31:47 PM
This is not what I asked, but thanks. :)
So if the offset for the AN_336 version is 0x17c then the default value would be 0xb8 for 400kHz?

Do not mind me, I just like the "puzzle". :-)

Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: aryelevin on January 08, 2020, 05:47:44 PM
OK, Thank you all for this.
If I load the AN_336 configuration code, then it doesn't works at all even after changing the 0x30b17c register to 40, probably because it tries to identify the IC ID/Vendor, and it fails duo to that its HYCON and not FocalTech, so its not working.

If there is any way to avoid the ID checking stuff (or other solution), I will be very happy to try it.

Thanks a lot again
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: BRT Community on January 09, 2020, 10:23:42 AM
Hello,

Sorry again that was for the HY4614, so I'm not sure with it would work for the HY4635.
As you are not using a goodix or focaltech touch controller you should not load the AN_336 configuration code. You should just use the 0x30b1ac register write instead.

Best regards,
BRT Community
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: Rudolph on January 09, 2020, 11:48:16 AM
Sorry for causing confusion with this side-step to AN_336.
I was merely trying to point out that writing to 0x30b1ac in order to change the I2C speed will only
work on an unpatched FT811/FT813 and not on an FT811/FT813 with applied AN_336 Goodix patch or a BT815/BT817.

And actually a method to change the I2C speed for BT815/BT817 would be usefull for anyone trying to hook up a TFT with a HY4635.
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: BRT Community on January 09, 2020, 12:57:43 PM
Hello Rudolph,

It's all good! and yes that is correct.

As for the BT81x I have some more information on this regarding a patch:
It is necessary to load a file to the touch engine for BT81x. Please refer to this Gpu_Hal.c (ftp://u45902898-ide:Ftd1$erv@ftp.ftdichip.com/CES/EVE/Gpu_Hal.c) file, see the end of function BootupConfig for the edits.

Code: [Select]
//########################### HYCON FIX BT81X ##################################################

/*\touch-capcs-815.binle
StartOffset: 00000000, EndOffset: 000005B1, Length: 000005B2 */
PROGMEM prog_uchar8_t TOUCH_DATA_U8_HYCON[1458] = {
0xD7, 0x02, 0xD8, 0x02, 0x00, 0x80, 0x8C, 0x66, 0x01, 0x80, 0x8F, 0x62,
0x27, 0x61, 0x10, 0x61, 0x1D, 0x6B, 0x9C, 0x61, 0x00, 0x80, 0x8F, 0x67,
0x10, 0x61, 0x9D, 0x61, 0x11, 0x61, 0x9D, 0x61, 0x27, 0x61, 0x8C, 0x60,
0x27, 0x61, 0x11, 0x61, 0x1D, 0x6B, 0x9C, 0x61, 0x27, 0x61, 0x27, 0x61,
0x11, 0x61, 0x11, 0x61, 0x1D, 0x6B, 0x1D, 0x6B, 0x27, 0x61, 0x10, 0x61,
0x27, 0x61, 0x10, 0x61, 0x1D, 0x6B, 0x1D, 0x6B, 0x10, 0x61, 0x27, 0x61,
0x10, 0x61, 0x1D, 0x6B, 0x8C, 0x60, 0x03, 0x67, 0x8C, 0x66, 0x0A, 0x40,
0x8C, 0x66, 0x00, 0x80, 0x8F, 0x68, 0x10, 0x61, 0x8F, 0x68, 0x03, 0x68,
0x8C, 0x66, 0x10, 0x61, 0x8F, 0x6F, 0x00, 0x6A, 0x8C, 0x66, 0x33, 0x40,
0x8F, 0x62, 0x0E, 0x40, 0x03, 0x68, 0x3C, 0x20, 0x03, 0x61, 0x3D, 0x00,
0x8F, 0x60, 0x8C, 0x60, 0x0E, 0x40, 0x2D, 0x40, 0x39, 0x00, 0x11, 0x60,
0x8F, 0x62, 0x01, 0x80, 0x8F, 0x69, 0x00, 0x6A, 0x00, 0x80, 0x8C, 0x67,
0x27, 0x80, 0x01, 0x80, 0x10, 0x61, 0x33, 0x60, 0x8F, 0x61, 0x00, 0x80,
0x4A, 0x00, 0x11, 0x6C, 0x10, 0x61, 0x04, 0x40, 0x8C, 0x6C, 0x06, 0x40,
0x0B, 0x80, 0x4B, 0x40, 0x4B, 0x00, 0x4F, 0x40, 0x10, 0x61, 0x27, 0x61,
0x03, 0x62, 0x10, 0x61, 0x11, 0x6B, 0x03, 0x62, 0x10, 0x61, 0x11, 0x61,
0x1D, 0x6B, 0x03, 0x6F, 0x35, 0x00, 0x4F, 0x40, 0x06, 0x40, 0x27, 0x61,
0x00, 0x80, 0x00, 0x80, 0x1D, 0x6B, 0x11, 0x60, 0x78, 0x20, 0x24, 0x60,
0x01, 0x80, 0x03, 0x63, 0x71, 0x20, 0x16, 0x40, 0x58, 0x40, 0x1C, 0x40,
0x0E, 0x40, 0x58, 0x40, 0x1C, 0x40, 0x1D, 0x6B, 0x43, 0x40, 0x69, 0x00,
0x03, 0x61, 0x1C, 0x40, 0x03, 0x61, 0x8F, 0x61, 0x0E, 0x40, 0x14, 0x80,
0x63, 0x40, 0x27, 0x61, 0x27, 0x61, 0x12, 0x80, 0x63, 0x40, 0x1D, 0x6B,
0x1D, 0x6B, 0x58, 0x40, 0x16, 0x80, 0x57, 0x40, 0x03, 0x60, 0x22, 0x40,
0x1A, 0x80, 0x63, 0x40, 0x27, 0x61, 0x27, 0x61, 0x18, 0x80, 0x63, 0x40,
0x1D, 0x6B, 0x1D, 0x6B, 0x58, 0x40, 0x1C, 0x80, 0x57, 0x40, 0x8F, 0x60,
0x01, 0x80, 0x10, 0x61, 0x09, 0x80, 0x00, 0x6C, 0x10, 0x61, 0x03, 0x69,
0x8F, 0x63, 0x0C, 0x80, 0x00, 0x6C, 0x8F, 0x67, 0x00, 0x80, 0x9D, 0x40,
0x00, 0x66, 0xA0, 0x20, 0x8C, 0x60, 0x00, 0x80, 0x0A, 0x80, 0x11, 0x6C,
0xA7, 0x20, 0x33, 0x60, 0x8F, 0x61, 0x11, 0x60, 0xB4, 0x20, 0x40, 0x86,
0xA5, 0x40, 0x45, 0x40, 0xAE, 0x20, 0x03, 0x61, 0x00, 0x6A, 0xAB, 0x00,
0x8F, 0x61, 0xA5, 0x40, 0xA5, 0x00, 0x2C, 0x80, 0x49, 0x00, 0x2B, 0x80,
0x4D, 0x40, 0x01, 0x80, 0x2A, 0x80, 0x33, 0x60, 0x03, 0x61, 0x2A, 0x80,
0x11, 0x6C, 0x0A, 0x40, 0xC5, 0x20, 0xA5, 0x40, 0xC0, 0x00, 0x8F, 0x61,
0x01, 0x80, 0x2B, 0x80, 0x33, 0x60, 0x8F, 0x61, 0x2B, 0x80, 0x49, 0x40,
0xBB, 0x00, 0x2B, 0x80, 0x4D, 0x40, 0x00, 0x80, 0x2A, 0x80, 0x33, 0x60,
0x8F, 0x61, 0x2B, 0x80, 0x49, 0x40, 0xCF, 0x00, 0xCF, 0x40, 0xA5, 0x00,
0xCA, 0x40, 0xB5, 0x40, 0xB9, 0x40, 0xB5, 0x40, 0xCD, 0x00, 0xD3, 0x40,
0xB5, 0x40, 0xCD, 0x40, 0xB5, 0x40, 0xB9, 0x40, 0xB5, 0x40, 0xCA, 0x00,
0xC6, 0x40, 0xA5, 0x40, 0xBB, 0x40, 0x2A, 0x80, 0x11, 0x6C, 0xE8, 0x20,
0x03, 0x61, 0x2B, 0x80, 0xB5, 0x40, 0x00, 0x6C, 0xD6, 0x00, 0xCF, 0x40,
0x2B, 0x80, 0x33, 0x60, 0x03, 0x61, 0xA5, 0x40, 0xBB, 0x40, 0xB5, 0x40,
0xD6, 0x00, 0x7F, 0x80, 0x04, 0x80, 0x98, 0x00, 0x00, 0x80, 0xF7, 0x40,
0x41, 0x40, 0x03, 0x64, 0xD8, 0x40, 0xCF, 0x40, 0xB5, 0x40, 0x11, 0x60,
0x07, 0x80, 0x03, 0x69, 0xEF, 0x40, 0x11, 0x60, 0x06, 0x80, 0x03, 0x69,
0xEF, 0x40, 0x11, 0x60, 0x05, 0x80, 0x03, 0x69, 0xEF, 0x40, 0x11, 0x60,
0x04, 0x80, 0x03, 0x69, 0xEF, 0x40, 0x11, 0x60, 0x03, 0x80, 0x03, 0x69,
0xEF, 0x40, 0x11, 0x60, 0x02, 0x80, 0x03, 0x69, 0xEF, 0x40, 0x11, 0x60,
0x01, 0x80, 0x03, 0x69, 0xEF, 0x40, 0xEF, 0x40, 0xE4, 0x40, 0x21, 0x21,
0x00, 0x00, 0x8C, 0x60, 0x41, 0x40, 0xE4, 0x40, 0x8F, 0x62, 0xE4, 0x40,
0x22, 0x41, 0x22, 0x41, 0x22, 0x41, 0x22, 0x41, 0x22, 0x41, 0x22, 0x41,
0x22, 0x01, 0x01, 0x80, 0xFB, 0x40, 0x25, 0x41, 0x00, 0x80, 0xEF, 0x00,
0x02, 0x40, 0xEF, 0x00, 0x25, 0x41, 0x30, 0x01, 0x34, 0x41, 0x22, 0x41,
0x22, 0x41, 0x22, 0x41, 0x22, 0x41, 0x22, 0x41, 0x22, 0x41, 0x22, 0x41,
0x22, 0x41, 0x30, 0x01, 0x25, 0x41, 0x32, 0x41, 0x03, 0x61, 0xDD, 0x00,
0x22, 0x80, 0x53, 0x00, 0x20, 0x80, 0x53, 0x00, 0x24, 0x80, 0x53, 0x00,
0x21, 0x80, 0x4B, 0x40, 0x44, 0x41, 0x0E, 0x40, 0x46, 0x41, 0x23, 0x80,
0x53, 0x00, 0x1D, 0x6B, 0x03, 0x62, 0x27, 0x61, 0x8C, 0x60, 0xFF, 0xFF,
0x00, 0x66, 0x9D, 0x60, 0x55, 0x41, 0x06, 0x40, 0x04, 0x80, 0x37, 0x40,
0x51, 0x41, 0x44, 0x01, 0x46, 0x01, 0x4F, 0x01, 0x48, 0x01, 0x21, 0x80,
0x4B, 0x40, 0x25, 0x80, 0x4B, 0x00, 0x05, 0x80, 0x11, 0x60, 0x00, 0x6A,
0x58, 0x41, 0x45, 0x40, 0x66, 0x21, 0x8C, 0x60, 0x11, 0x60, 0x05, 0x80,
0x03, 0x6F, 0x75, 0x21, 0x01, 0x80, 0x10, 0x61, 0x03, 0x71, 0x03, 0x64,
0x76, 0x01, 0x8F, 0x61, 0x8C, 0x60, 0x27, 0x61, 0x00, 0x80, 0x10, 0x61,
0x11, 0x60, 0x82, 0x21, 0x10, 0x61, 0x11, 0x6B, 0x10, 0x40, 0x10, 0x61,
0x00, 0x6A, 0x7A, 0x01, 0xB5, 0x40, 0x40, 0x41, 0x03, 0x61, 0x0C, 0x60,
0x11, 0x60, 0x00, 0x80, 0x11, 0x60, 0x05, 0x80, 0x03, 0x68, 0x98, 0x21,
0x27, 0x61, 0x11, 0x60, 0x01, 0x80, 0x03, 0x63, 0x0A, 0x40, 0x94, 0x21,
0x11, 0x6B, 0x58, 0x41, 0x43, 0x40, 0x1D, 0x6B, 0x04, 0x40, 0x88, 0x01,
0x7A, 0x00, 0x03, 0x80, 0x96, 0x40, 0x0A, 0x00, 0xF7, 0x40, 0x5D, 0x80,
0x8F, 0x67, 0x4E, 0x81, 0xFA, 0x40, 0x9C, 0x41, 0xA8, 0x21, 0x08, 0x80,
0x00, 0x69, 0x80, 0x80, 0x03, 0x64, 0x01, 0x41, 0x01, 0x01, 0x00, 0x80,
0x0E, 0x80, 0x9E, 0x00, 0xA9, 0x41, 0x8C, 0x66, 0xB5, 0x40, 0x11, 0x61,
0x10, 0x40, 0x00, 0x80, 0x9D, 0x40, 0x03, 0x64, 0xB6, 0x21, 0x01, 0x00,
0x2D, 0x80, 0x00, 0x6C, 0x00, 0x67, 0xAF, 0x21, 0x7A, 0x00, 0xAC, 0x81,
0x9C, 0x41, 0xC4, 0x21, 0x4D, 0x80, 0xA0, 0x41, 0xDD, 0x40, 0x2D, 0x41,
0x40, 0x41, 0xC5, 0x01, 0x99, 0x41, 0x01, 0x80, 0x03, 0x63, 0x0E, 0x40,
0xAE, 0x41, 0x01, 0x80, 0x03, 0x65, 0xAE, 0x01, 0xA9, 0x81, 0xBC, 0x01,
0x36, 0x41, 0xFF, 0x8F, 0x8F, 0x63, 0xCE, 0x41, 0x36, 0x41, 0x0C, 0x80,
0x00, 0x69, 0x27, 0x61, 0xCF, 0x41, 0x36, 0x41, 0x03, 0x61, 0x7C, 0x40,
0x11, 0x6B, 0x5A, 0x41, 0x1D, 0x6B, 0x6C, 0x01, 0xFA, 0x40, 0x02, 0x80,
0x01, 0x41, 0xDD, 0x40, 0x2D, 0x01, 0xDE, 0x41, 0xD1, 0x81, 0x77, 0x41,
0x8F, 0x61, 0x02, 0x40, 0x02, 0x40, 0x55, 0x41, 0xFF, 0xFF, 0x8C, 0x60,
0xDE, 0x41, 0xCE, 0x41, 0xCE, 0x41, 0x06, 0x40, 0xF5, 0x21, 0x0E, 0x40,
0x7C, 0x40, 0xC8, 0x80, 0xF7, 0x01, 0x7A, 0x40, 0xE7, 0x41, 0xB5, 0x40,
0x40, 0x41, 0x4A, 0x01, 0xBB, 0x41, 0xE3, 0x41, 0x48, 0x40, 0xFA, 0x01,
0xCC, 0x41, 0xEC, 0x41, 0x48, 0x40, 0xFE, 0x01, 0x34, 0x41, 0x34, 0x41,
0x08, 0x80, 0x03, 0x71, 0x8F, 0x62, 0x9F, 0x41, 0xDD, 0x40, 0x2D, 0x41,
0x0F, 0x80, 0x8F, 0x63, 0x07, 0x42, 0x34, 0x41, 0x03, 0x61, 0x02, 0x42,
0x02, 0x42, 0xEF, 0x41, 0x9F, 0x41, 0x00, 0x80, 0x01, 0x41, 0xDD, 0x00,
0xCC, 0x41, 0x0C, 0x42, 0x48, 0x40, 0x16, 0x02, 0x34, 0x41, 0x27, 0x61,
0x02, 0x42, 0x02, 0x42, 0x34, 0x41, 0x03, 0x61, 0xD7, 0x01, 0x07, 0x42,
0x1A, 0x82, 0x77, 0x41, 0x12, 0x02, 0x00, 0x80, 0xBB, 0x41, 0x21, 0x42,
0x0C, 0x40, 0x03, 0x64, 0x2C, 0x22, 0x48, 0x40, 0x26, 0x02, 0x27, 0x61,
0x11, 0x6B, 0x00, 0x6C, 0x11, 0x67, 0x34, 0x22, 0x03, 0x61, 0x2E, 0x02,
0x0C, 0x60, 0x8F, 0x60, 0x11, 0x64, 0x2B, 0x00, 0x01, 0x80, 0x11, 0x61,
0x8F, 0x71, 0x00, 0x80, 0x11, 0x60, 0x05, 0x80, 0x03, 0x68, 0x4C, 0x22,
0x27, 0x61, 0x11, 0x60, 0x01, 0x80, 0x03, 0x63, 0x0A, 0x40, 0x48, 0x22,
0x11, 0x6B, 0x58, 0x41, 0x43, 0x40, 0x1D, 0x6B, 0x04, 0x40, 0x3C, 0x02,
0x7A, 0x00, 0xAC, 0x41, 0x52, 0x22, 0xE7, 0x41, 0x4A, 0x41, 0x53, 0x02,
0x65, 0x41, 0x29, 0x80, 0x49, 0x40, 0x0F, 0x80, 0x10, 0x80, 0x00, 0x6C,
0x11, 0x67, 0x5C, 0x22, 0x03, 0x61, 0x56, 0x02, 0x0F, 0x80, 0x00, 0x65,
0x68, 0x22, 0x0D, 0x80, 0x00, 0x6C, 0x11, 0x80, 0x00, 0x6C, 0x27, 0x61,
0x27, 0x61, 0x29, 0x80, 0x4D, 0x40, 0x56, 0x02, 0x03, 0x61, 0xAC, 0x41,
0x76, 0x22, 0x1D, 0x6B, 0x1D, 0x6B, 0x36, 0x42, 0x71, 0x22, 0xE7, 0x41,
0x74, 0x02, 0x0E, 0x40, 0x7C, 0x40, 0xC8, 0x80, 0x4A, 0x41, 0x8D, 0x02,
0x00, 0x80, 0x10, 0x61, 0x0F, 0x80, 0x00, 0x65, 0x8B, 0x22, 0x38, 0x42,
0x06, 0x40, 0x03, 0x64, 0x10, 0x61, 0x1D, 0x6B, 0x1D, 0x6B, 0x36, 0x42,
0x86, 0x22, 0x7A, 0x40, 0x55, 0x41, 0x87, 0x02, 0x7C, 0x40, 0x06, 0x40,
0x5A, 0x41, 0x10, 0x61, 0x78, 0x02, 0x03, 0x61, 0x3B, 0x42, 0x48, 0x40,
0x53, 0x02, 0x8C, 0x60, 0x0B, 0x80, 0x96, 0x40, 0xA0, 0x20, 0xFA, 0x40,
0x99, 0x41, 0x98, 0x22, 0x03, 0x80, 0xA5, 0x80, 0x01, 0x41, 0x01, 0x41,
0xDD, 0x40, 0xA0, 0x40, 0x00, 0x00, 0x2C, 0x80, 0x4D, 0x40, 0xAB, 0x40,
0xB7, 0x40, 0xAB, 0x00, 0x0E, 0x80, 0x96, 0x40, 0xA6, 0x22, 0x4D, 0x42,
0xB7, 0x40, 0xAC, 0x41, 0x11, 0x60, 0xAD, 0x22, 0xE7, 0x41, 0x4A, 0x41,
0xAE, 0x02, 0x65, 0x41, 0x48, 0x40, 0x02, 0x80, 0x9A, 0x41, 0xC2, 0x22,
0x9C, 0x41, 0xBF, 0x22, 0x01, 0x80, 0x04, 0x80, 0x4B, 0x40, 0x37, 0x80,
0x01, 0x80, 0x9D, 0x42, 0x04, 0x80, 0x4D, 0x40, 0x50, 0x80, 0xAB, 0x40,
0xC2, 0x02, 0x2C, 0x81, 0x06, 0x80, 0x9D, 0x42, 0xAC, 0x41, 0x27, 0x40,
0x1F, 0x41, 0x01, 0x80, 0xAB, 0x00, 0x00, 0x80, 0x9D, 0x40, 0xCB, 0x22,
0x90, 0x42, 0x9C, 0x41, 0xD0, 0x22, 0xAC, 0x41, 0x25, 0x22, 0x16, 0x42,
0xAC, 0x41, 0xFA, 0x21, 0xFE, 0x41, 0xFA, 0x40, 0xA1, 0x41, 0x01, 0x41,
0xDD, 0x00, 0xA2, 0x42, 0xC7, 0x02
};


Gpu_Hal_Wr8(host, REG_CPURESET, 0x02);
Gpu_Hal_WrMem(host, RAM_JTBOOT, (uint8_t *)TOUCH_DATA_U8_HYCON, sizeof(TOUCH_DATA_U8_HYCON));
//(vc.RAM_JTBOOT, open("touch-capcs-815.binle").read());
Gpu_Hal_Wr8(host, REG_CPURESET, 0x00);

Best Regards,
BRT Community
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: Rudolph on January 09, 2020, 02:07:03 PM
Dang, now I have to check if I can get myself a TFT with a HY4635 that connects to one of the BT815 modules I have. :)

And from the technical perspective, the interesting part for me is that this is a direct patch for BT81x unlike
the 811-cap-100 blob from AN_336 which is a packed binary to be send to the command copro to be executed to
have the included CMD_INFLATE write to 0x30b00.

Now give us a patch-sdk for the FT81x/BT81x, please.  ;D



Edit: trying to source a TFT for the BT815 boards I have only once again proved to me that I better stick
to complete display modules.

I have three different options for BT815, the EVE3 series from Matrix-Orbital, the RiTFT series from Riverdi and PA70/PA90 from Panays.
Much to my surprise all three do not only use a 40pol FFC for  the display itself, but the pinout is compatible.
For the touch interface however, Matrix-Orbital uses a 6 pin, Riverdi a 10 pin and Panasys a 12 pin.

I did not only fail to find a TFT with HY4635 that is compatible, I failed to find any compatible TFT for either of the three.
If the panel is using a 40 pin connector the pinout does not match.
If the 40pin connector pinout is a match it uses a different pinout for the touch connector.

And if I had found a TFT with matching pinouts it probably would have been mechanically impossible to fit both connectors the board.

And if I had found a perfect match I probably had no way to buy it.

Okay, I admit that I gave up after going over only 30+ TFT datasheets...
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: aryelevin on January 11, 2020, 06:05:19 PM
Hi everyone.

What if I need to change a register on the CTP IC, how can I achieve it?

Thanks a lot.

Have a great weekend
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: BRT Community on January 13, 2020, 11:17:15 AM
Hello,

Below is a code example for changing FT5x06 touch controllers PMODE to deep sleep, the methodology would be the same for other touch controllers:

Code: [Select]
/* API to download custom capacitive touch firmware */ ft_void_t SAMAPP_InitCustomTouch(ft_uint32_t num_regs, ft_uint8_t *reg_value) {
       ft_uint16_t patch,i_set,i_eol;

       /* Reset the touch engine and download firmware into ROMSUB */ #ifdef FT_80X_ENABLE
  Ft_Gpu_Hal_Wr8(phost, REG_CPURESET, 1);
  Ft_Gpu_Hal_Wr8(phost, REG_ROMSUB_ENABLE_ACCESS, 1);
  Ft_Gpu_Hal_Wr8(phost, REG_ROMSUB_SEL, 0);

  /* Download the firmware into ROMSUB memory*/
  Ft_Gpu_Hal_WrMem(phost,ROMSUB_ADDR, CTouchFirmware, sizeof(CTouchFirmware));

#else
  Ft_Gpu_Hal_Wr8(phost, REG_CPURESET, 2);

#endif
#ifdef FT_80X_ENABLE
  /* Construction of commands to the touch engine for register write at the reset */
  patch = PATCH_START;

  i_set = FW_RD(patch + 2);
  i_eol = FW_RD(patch + 3);
#else
  ft_uint16_t main = FW_RD(0) & 0xfff;
  i_set = 0x4000 | (main - 4);
  patch = main + 1;
  i_eol = FW_RD(patch);

#endif   
  while (num_regs--) {
    ft_uint8_t reg = *reg_value++;
    ft_uint8_t val = *reg_value++;
       /* construction of register and values */
    FW_WR(patch++, 0x8000 | val);
    FW_WR(patch++, 0x8000 | reg);
    FW_WR(patch++, i_set);
  }
  /* constuction of end of line command to touch engine */
  FW_WR(patch, i_eol);

#ifdef FT_80X_ENABLE
  /* Assign the ROMSUB to touch engine and release from reset */
  Ft_Gpu_Hal_Wr8(phost, REG_ROMSUB_ENABLE_ACCESS, 0);
  Ft_Gpu_Hal_Wr8(phost, REG_ROMSUB_SEL, 1); #endif
  Ft_Gpu_Hal_Wr8(phost, REG_CPURESET, 0);
 
  Ft_Gpu_Hal_Sleep(300);//startup time required by touch engine to initialized touch controller }

The memory is ROMSUB which is at 3190784UL.

The structure is copied into ROMSUB with <address,value> and at the end “EOL” constants to indicate the end of structure.

Note that some settings in the CTP may require factory mode (such as setting gain) which can’t be done using this method. You may require firmware from the CTP manufacturer for some settings.

Alternatively, If you wanted to perform full direct firmware programming of the CTP, you can set the FT813 touch engine reset bit(or hold FT813 in power-down state), and talk directly between the MCU’s I2C master and the CTP.

Best Regards,
BRT Community
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: Norm on February 04, 2020, 10:04:06 AM
Hi,
did anybody get a touch controller working with this HYCON FIX BT81X  hack ?

I have a BT815 (with ESP32 controller) and two different Hyline touches (5,0" and 7,0"). I found that I2C Adress is 0x2A.
Without the hack I get sometimes good Y-coordinates but just random X-Value. I can see on the scope that the I2C relply from the touch controller ends after some bytes, so I guessed clock speed is too fast. I measured 340kHz without hack.
I tried to write the HYCON FIX blog from above into the RAM_JTBOOT (0x30b000) but this didn't change anything. I2C clock speed is still the same. Shouldn't this be slower after the hack ?
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: BRT Community on February 04, 2020, 01:56:59 PM
Hello,

Do you know which touch controllers your displays are using?

To perform the Hycon clock stretching fix for the BT81x, it is necessary to load a file to the touch engine for BT81x, please see below:
Hello Rudolph,

It's all good! and yes that is correct.

As for the BT81x I have some more information on this regarding a patch:
It is necessary to load a file to the touch engine for BT81x. Please refer to this Gpu_Hal.c (ftp://u45902898-ide:Ftd1$erv@ftp.ftdichip.com/CES/EVE/Gpu_Hal.c) file, see the end of function BootupConfig for the edits.

Code: [Select]
//########################### HYCON FIX BT81X ##################################################

/*\touch-capcs-815.binle
StartOffset: 00000000, EndOffset: 000005B1, Length: 000005B2 */
PROGMEM prog_uchar8_t TOUCH_DATA_U8_HYCON[1458] = {
0xD7, 0x02, 0xD8, 0x02, 0x00, 0x80, 0x8C, 0x66, 0x01, 0x80, 0x8F, 0x62,
0x27, 0x61, 0x10, 0x61, 0x1D, 0x6B, 0x9C, 0x61, 0x00, 0x80, 0x8F, 0x67,
0x10, 0x61, 0x9D, 0x61, 0x11, 0x61, 0x9D, 0x61, 0x27, 0x61, 0x8C, 0x60,
0x27, 0x61, 0x11, 0x61, 0x1D, 0x6B, 0x9C, 0x61, 0x27, 0x61, 0x27, 0x61,
0x11, 0x61, 0x11, 0x61, 0x1D, 0x6B, 0x1D, 0x6B, 0x27, 0x61, 0x10, 0x61,
0x27, 0x61, 0x10, 0x61, 0x1D, 0x6B, 0x1D, 0x6B, 0x10, 0x61, 0x27, 0x61,
0x10, 0x61, 0x1D, 0x6B, 0x8C, 0x60, 0x03, 0x67, 0x8C, 0x66, 0x0A, 0x40,
0x8C, 0x66, 0x00, 0x80, 0x8F, 0x68, 0x10, 0x61, 0x8F, 0x68, 0x03, 0x68,
0x8C, 0x66, 0x10, 0x61, 0x8F, 0x6F, 0x00, 0x6A, 0x8C, 0x66, 0x33, 0x40,
0x8F, 0x62, 0x0E, 0x40, 0x03, 0x68, 0x3C, 0x20, 0x03, 0x61, 0x3D, 0x00,
0x8F, 0x60, 0x8C, 0x60, 0x0E, 0x40, 0x2D, 0x40, 0x39, 0x00, 0x11, 0x60,
0x8F, 0x62, 0x01, 0x80, 0x8F, 0x69, 0x00, 0x6A, 0x00, 0x80, 0x8C, 0x67,
0x27, 0x80, 0x01, 0x80, 0x10, 0x61, 0x33, 0x60, 0x8F, 0x61, 0x00, 0x80,
0x4A, 0x00, 0x11, 0x6C, 0x10, 0x61, 0x04, 0x40, 0x8C, 0x6C, 0x06, 0x40,
0x0B, 0x80, 0x4B, 0x40, 0x4B, 0x00, 0x4F, 0x40, 0x10, 0x61, 0x27, 0x61,
0x03, 0x62, 0x10, 0x61, 0x11, 0x6B, 0x03, 0x62, 0x10, 0x61, 0x11, 0x61,
0x1D, 0x6B, 0x03, 0x6F, 0x35, 0x00, 0x4F, 0x40, 0x06, 0x40, 0x27, 0x61,
0x00, 0x80, 0x00, 0x80, 0x1D, 0x6B, 0x11, 0x60, 0x78, 0x20, 0x24, 0x60,
0x01, 0x80, 0x03, 0x63, 0x71, 0x20, 0x16, 0x40, 0x58, 0x40, 0x1C, 0x40,
0x0E, 0x40, 0x58, 0x40, 0x1C, 0x40, 0x1D, 0x6B, 0x43, 0x40, 0x69, 0x00,
0x03, 0x61, 0x1C, 0x40, 0x03, 0x61, 0x8F, 0x61, 0x0E, 0x40, 0x14, 0x80,
0x63, 0x40, 0x27, 0x61, 0x27, 0x61, 0x12, 0x80, 0x63, 0x40, 0x1D, 0x6B,
0x1D, 0x6B, 0x58, 0x40, 0x16, 0x80, 0x57, 0x40, 0x03, 0x60, 0x22, 0x40,
0x1A, 0x80, 0x63, 0x40, 0x27, 0x61, 0x27, 0x61, 0x18, 0x80, 0x63, 0x40,
0x1D, 0x6B, 0x1D, 0x6B, 0x58, 0x40, 0x1C, 0x80, 0x57, 0x40, 0x8F, 0x60,
0x01, 0x80, 0x10, 0x61, 0x09, 0x80, 0x00, 0x6C, 0x10, 0x61, 0x03, 0x69,
0x8F, 0x63, 0x0C, 0x80, 0x00, 0x6C, 0x8F, 0x67, 0x00, 0x80, 0x9D, 0x40,
0x00, 0x66, 0xA0, 0x20, 0x8C, 0x60, 0x00, 0x80, 0x0A, 0x80, 0x11, 0x6C,
0xA7, 0x20, 0x33, 0x60, 0x8F, 0x61, 0x11, 0x60, 0xB4, 0x20, 0x40, 0x86,
0xA5, 0x40, 0x45, 0x40, 0xAE, 0x20, 0x03, 0x61, 0x00, 0x6A, 0xAB, 0x00,
0x8F, 0x61, 0xA5, 0x40, 0xA5, 0x00, 0x2C, 0x80, 0x49, 0x00, 0x2B, 0x80,
0x4D, 0x40, 0x01, 0x80, 0x2A, 0x80, 0x33, 0x60, 0x03, 0x61, 0x2A, 0x80,
0x11, 0x6C, 0x0A, 0x40, 0xC5, 0x20, 0xA5, 0x40, 0xC0, 0x00, 0x8F, 0x61,
0x01, 0x80, 0x2B, 0x80, 0x33, 0x60, 0x8F, 0x61, 0x2B, 0x80, 0x49, 0x40,
0xBB, 0x00, 0x2B, 0x80, 0x4D, 0x40, 0x00, 0x80, 0x2A, 0x80, 0x33, 0x60,
0x8F, 0x61, 0x2B, 0x80, 0x49, 0x40, 0xCF, 0x00, 0xCF, 0x40, 0xA5, 0x00,
0xCA, 0x40, 0xB5, 0x40, 0xB9, 0x40, 0xB5, 0x40, 0xCD, 0x00, 0xD3, 0x40,
0xB5, 0x40, 0xCD, 0x40, 0xB5, 0x40, 0xB9, 0x40, 0xB5, 0x40, 0xCA, 0x00,
0xC6, 0x40, 0xA5, 0x40, 0xBB, 0x40, 0x2A, 0x80, 0x11, 0x6C, 0xE8, 0x20,
0x03, 0x61, 0x2B, 0x80, 0xB5, 0x40, 0x00, 0x6C, 0xD6, 0x00, 0xCF, 0x40,
0x2B, 0x80, 0x33, 0x60, 0x03, 0x61, 0xA5, 0x40, 0xBB, 0x40, 0xB5, 0x40,
0xD6, 0x00, 0x7F, 0x80, 0x04, 0x80, 0x98, 0x00, 0x00, 0x80, 0xF7, 0x40,
0x41, 0x40, 0x03, 0x64, 0xD8, 0x40, 0xCF, 0x40, 0xB5, 0x40, 0x11, 0x60,
0x07, 0x80, 0x03, 0x69, 0xEF, 0x40, 0x11, 0x60, 0x06, 0x80, 0x03, 0x69,
0xEF, 0x40, 0x11, 0x60, 0x05, 0x80, 0x03, 0x69, 0xEF, 0x40, 0x11, 0x60,
0x04, 0x80, 0x03, 0x69, 0xEF, 0x40, 0x11, 0x60, 0x03, 0x80, 0x03, 0x69,
0xEF, 0x40, 0x11, 0x60, 0x02, 0x80, 0x03, 0x69, 0xEF, 0x40, 0x11, 0x60,
0x01, 0x80, 0x03, 0x69, 0xEF, 0x40, 0xEF, 0x40, 0xE4, 0x40, 0x21, 0x21,
0x00, 0x00, 0x8C, 0x60, 0x41, 0x40, 0xE4, 0x40, 0x8F, 0x62, 0xE4, 0x40,
0x22, 0x41, 0x22, 0x41, 0x22, 0x41, 0x22, 0x41, 0x22, 0x41, 0x22, 0x41,
0x22, 0x01, 0x01, 0x80, 0xFB, 0x40, 0x25, 0x41, 0x00, 0x80, 0xEF, 0x00,
0x02, 0x40, 0xEF, 0x00, 0x25, 0x41, 0x30, 0x01, 0x34, 0x41, 0x22, 0x41,
0x22, 0x41, 0x22, 0x41, 0x22, 0x41, 0x22, 0x41, 0x22, 0x41, 0x22, 0x41,
0x22, 0x41, 0x30, 0x01, 0x25, 0x41, 0x32, 0x41, 0x03, 0x61, 0xDD, 0x00,
0x22, 0x80, 0x53, 0x00, 0x20, 0x80, 0x53, 0x00, 0x24, 0x80, 0x53, 0x00,
0x21, 0x80, 0x4B, 0x40, 0x44, 0x41, 0x0E, 0x40, 0x46, 0x41, 0x23, 0x80,
0x53, 0x00, 0x1D, 0x6B, 0x03, 0x62, 0x27, 0x61, 0x8C, 0x60, 0xFF, 0xFF,
0x00, 0x66, 0x9D, 0x60, 0x55, 0x41, 0x06, 0x40, 0x04, 0x80, 0x37, 0x40,
0x51, 0x41, 0x44, 0x01, 0x46, 0x01, 0x4F, 0x01, 0x48, 0x01, 0x21, 0x80,
0x4B, 0x40, 0x25, 0x80, 0x4B, 0x00, 0x05, 0x80, 0x11, 0x60, 0x00, 0x6A,
0x58, 0x41, 0x45, 0x40, 0x66, 0x21, 0x8C, 0x60, 0x11, 0x60, 0x05, 0x80,
0x03, 0x6F, 0x75, 0x21, 0x01, 0x80, 0x10, 0x61, 0x03, 0x71, 0x03, 0x64,
0x76, 0x01, 0x8F, 0x61, 0x8C, 0x60, 0x27, 0x61, 0x00, 0x80, 0x10, 0x61,
0x11, 0x60, 0x82, 0x21, 0x10, 0x61, 0x11, 0x6B, 0x10, 0x40, 0x10, 0x61,
0x00, 0x6A, 0x7A, 0x01, 0xB5, 0x40, 0x40, 0x41, 0x03, 0x61, 0x0C, 0x60,
0x11, 0x60, 0x00, 0x80, 0x11, 0x60, 0x05, 0x80, 0x03, 0x68, 0x98, 0x21,
0x27, 0x61, 0x11, 0x60, 0x01, 0x80, 0x03, 0x63, 0x0A, 0x40, 0x94, 0x21,
0x11, 0x6B, 0x58, 0x41, 0x43, 0x40, 0x1D, 0x6B, 0x04, 0x40, 0x88, 0x01,
0x7A, 0x00, 0x03, 0x80, 0x96, 0x40, 0x0A, 0x00, 0xF7, 0x40, 0x5D, 0x80,
0x8F, 0x67, 0x4E, 0x81, 0xFA, 0x40, 0x9C, 0x41, 0xA8, 0x21, 0x08, 0x80,
0x00, 0x69, 0x80, 0x80, 0x03, 0x64, 0x01, 0x41, 0x01, 0x01, 0x00, 0x80,
0x0E, 0x80, 0x9E, 0x00, 0xA9, 0x41, 0x8C, 0x66, 0xB5, 0x40, 0x11, 0x61,
0x10, 0x40, 0x00, 0x80, 0x9D, 0x40, 0x03, 0x64, 0xB6, 0x21, 0x01, 0x00,
0x2D, 0x80, 0x00, 0x6C, 0x00, 0x67, 0xAF, 0x21, 0x7A, 0x00, 0xAC, 0x81,
0x9C, 0x41, 0xC4, 0x21, 0x4D, 0x80, 0xA0, 0x41, 0xDD, 0x40, 0x2D, 0x41,
0x40, 0x41, 0xC5, 0x01, 0x99, 0x41, 0x01, 0x80, 0x03, 0x63, 0x0E, 0x40,
0xAE, 0x41, 0x01, 0x80, 0x03, 0x65, 0xAE, 0x01, 0xA9, 0x81, 0xBC, 0x01,
0x36, 0x41, 0xFF, 0x8F, 0x8F, 0x63, 0xCE, 0x41, 0x36, 0x41, 0x0C, 0x80,
0x00, 0x69, 0x27, 0x61, 0xCF, 0x41, 0x36, 0x41, 0x03, 0x61, 0x7C, 0x40,
0x11, 0x6B, 0x5A, 0x41, 0x1D, 0x6B, 0x6C, 0x01, 0xFA, 0x40, 0x02, 0x80,
0x01, 0x41, 0xDD, 0x40, 0x2D, 0x01, 0xDE, 0x41, 0xD1, 0x81, 0x77, 0x41,
0x8F, 0x61, 0x02, 0x40, 0x02, 0x40, 0x55, 0x41, 0xFF, 0xFF, 0x8C, 0x60,
0xDE, 0x41, 0xCE, 0x41, 0xCE, 0x41, 0x06, 0x40, 0xF5, 0x21, 0x0E, 0x40,
0x7C, 0x40, 0xC8, 0x80, 0xF7, 0x01, 0x7A, 0x40, 0xE7, 0x41, 0xB5, 0x40,
0x40, 0x41, 0x4A, 0x01, 0xBB, 0x41, 0xE3, 0x41, 0x48, 0x40, 0xFA, 0x01,
0xCC, 0x41, 0xEC, 0x41, 0x48, 0x40, 0xFE, 0x01, 0x34, 0x41, 0x34, 0x41,
0x08, 0x80, 0x03, 0x71, 0x8F, 0x62, 0x9F, 0x41, 0xDD, 0x40, 0x2D, 0x41,
0x0F, 0x80, 0x8F, 0x63, 0x07, 0x42, 0x34, 0x41, 0x03, 0x61, 0x02, 0x42,
0x02, 0x42, 0xEF, 0x41, 0x9F, 0x41, 0x00, 0x80, 0x01, 0x41, 0xDD, 0x00,
0xCC, 0x41, 0x0C, 0x42, 0x48, 0x40, 0x16, 0x02, 0x34, 0x41, 0x27, 0x61,
0x02, 0x42, 0x02, 0x42, 0x34, 0x41, 0x03, 0x61, 0xD7, 0x01, 0x07, 0x42,
0x1A, 0x82, 0x77, 0x41, 0x12, 0x02, 0x00, 0x80, 0xBB, 0x41, 0x21, 0x42,
0x0C, 0x40, 0x03, 0x64, 0x2C, 0x22, 0x48, 0x40, 0x26, 0x02, 0x27, 0x61,
0x11, 0x6B, 0x00, 0x6C, 0x11, 0x67, 0x34, 0x22, 0x03, 0x61, 0x2E, 0x02,
0x0C, 0x60, 0x8F, 0x60, 0x11, 0x64, 0x2B, 0x00, 0x01, 0x80, 0x11, 0x61,
0x8F, 0x71, 0x00, 0x80, 0x11, 0x60, 0x05, 0x80, 0x03, 0x68, 0x4C, 0x22,
0x27, 0x61, 0x11, 0x60, 0x01, 0x80, 0x03, 0x63, 0x0A, 0x40, 0x48, 0x22,
0x11, 0x6B, 0x58, 0x41, 0x43, 0x40, 0x1D, 0x6B, 0x04, 0x40, 0x3C, 0x02,
0x7A, 0x00, 0xAC, 0x41, 0x52, 0x22, 0xE7, 0x41, 0x4A, 0x41, 0x53, 0x02,
0x65, 0x41, 0x29, 0x80, 0x49, 0x40, 0x0F, 0x80, 0x10, 0x80, 0x00, 0x6C,
0x11, 0x67, 0x5C, 0x22, 0x03, 0x61, 0x56, 0x02, 0x0F, 0x80, 0x00, 0x65,
0x68, 0x22, 0x0D, 0x80, 0x00, 0x6C, 0x11, 0x80, 0x00, 0x6C, 0x27, 0x61,
0x27, 0x61, 0x29, 0x80, 0x4D, 0x40, 0x56, 0x02, 0x03, 0x61, 0xAC, 0x41,
0x76, 0x22, 0x1D, 0x6B, 0x1D, 0x6B, 0x36, 0x42, 0x71, 0x22, 0xE7, 0x41,
0x74, 0x02, 0x0E, 0x40, 0x7C, 0x40, 0xC8, 0x80, 0x4A, 0x41, 0x8D, 0x02,
0x00, 0x80, 0x10, 0x61, 0x0F, 0x80, 0x00, 0x65, 0x8B, 0x22, 0x38, 0x42,
0x06, 0x40, 0x03, 0x64, 0x10, 0x61, 0x1D, 0x6B, 0x1D, 0x6B, 0x36, 0x42,
0x86, 0x22, 0x7A, 0x40, 0x55, 0x41, 0x87, 0x02, 0x7C, 0x40, 0x06, 0x40,
0x5A, 0x41, 0x10, 0x61, 0x78, 0x02, 0x03, 0x61, 0x3B, 0x42, 0x48, 0x40,
0x53, 0x02, 0x8C, 0x60, 0x0B, 0x80, 0x96, 0x40, 0xA0, 0x20, 0xFA, 0x40,
0x99, 0x41, 0x98, 0x22, 0x03, 0x80, 0xA5, 0x80, 0x01, 0x41, 0x01, 0x41,
0xDD, 0x40, 0xA0, 0x40, 0x00, 0x00, 0x2C, 0x80, 0x4D, 0x40, 0xAB, 0x40,
0xB7, 0x40, 0xAB, 0x00, 0x0E, 0x80, 0x96, 0x40, 0xA6, 0x22, 0x4D, 0x42,
0xB7, 0x40, 0xAC, 0x41, 0x11, 0x60, 0xAD, 0x22, 0xE7, 0x41, 0x4A, 0x41,
0xAE, 0x02, 0x65, 0x41, 0x48, 0x40, 0x02, 0x80, 0x9A, 0x41, 0xC2, 0x22,
0x9C, 0x41, 0xBF, 0x22, 0x01, 0x80, 0x04, 0x80, 0x4B, 0x40, 0x37, 0x80,
0x01, 0x80, 0x9D, 0x42, 0x04, 0x80, 0x4D, 0x40, 0x50, 0x80, 0xAB, 0x40,
0xC2, 0x02, 0x2C, 0x81, 0x06, 0x80, 0x9D, 0x42, 0xAC, 0x41, 0x27, 0x40,
0x1F, 0x41, 0x01, 0x80, 0xAB, 0x00, 0x00, 0x80, 0x9D, 0x40, 0xCB, 0x22,
0x90, 0x42, 0x9C, 0x41, 0xD0, 0x22, 0xAC, 0x41, 0x25, 0x22, 0x16, 0x42,
0xAC, 0x41, 0xFA, 0x21, 0xFE, 0x41, 0xFA, 0x40, 0xA1, 0x41, 0x01, 0x41,
0xDD, 0x00, 0xA2, 0x42, 0xC7, 0x02
};


Gpu_Hal_Wr8(host, REG_CPURESET, 0x02);
Gpu_Hal_WrMem(host, RAM_JTBOOT, (uint8_t *)TOUCH_DATA_U8_HYCON, sizeof(TOUCH_DATA_U8_HYCON));
//(vc.RAM_JTBOOT, open("touch-capcs-815.binle").read());
Gpu_Hal_Wr8(host, REG_CPURESET, 0x00);

Best Regards,
BRT Community


Best Regards,
BRT Community
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: Norm on February 04, 2020, 02:34:11 PM
Hello,

Do you know which touch controllers your displays are using?

To perform the Hycon clock stretching fix for the BT81x, it is necessary to load a file to the touch engine for BT81x, please see below:


At least the 5" uses a EXC80h32 Controller, Manufacturer is eGalax. The 7" looks the same but I can't read something on the chip.

I did load this file but it didn't change anything. Is this file supposed to change the I2C Clock speed as well or only activate clock streching ?
Title: Re: PowerTip PH800480T013-IHC12 with HY4635: touch problem
Post by: BRT Community on February 04, 2020, 03:18:40 PM
Hello,

These fixes, as previously mentioned in this thread are for Hycon HY4614 Series touch controllers.

For your touch controller you will be required to use Touch Host Mode, please refer to section 4.8.7 of the BT81x datasheet:
https://brtchip.com/wp-content/uploads/Support/Documentation/Datasheets/ICs/EVE/DS_BT81X.pdf (https://brtchip.com/wp-content/uploads/Support/Documentation/Datasheets/ICs/EVE/DS_BT81X.pdf)

Best Regards,
BRT Community