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

Pages: 1 [2]

Author Topic: Updating Capacitive Touch Controller Firmware of BT815  (Read 15997 times)

david

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Updating Capacitive Touch Controller Firmware of BT815
« Reply #15 on: May 02, 2022, 03:12:01 PM »

I used the Ili2511, but also tried without any touch controller and just used fixed numbers instead of i2c connection which seemed also not to work (Described it in the first post of this thread).
Logged

david

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Updating Capacitive Touch Controller Firmware of BT815
« Reply #16 on: May 10, 2022, 06:45:09 AM »

This really gets frustrating at some point, I am waiting for an answer for close to one year now. Besides the initials answer that you could reproduce it on your side I never got something back. Could you please check that? If it is reproducable on your side, it would help a lot to know if this feature is not working at all or if there are just specific cases. I provided test code without any specific hardware needed to reproduce the issue.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Updating Capacitive Touch Controller Firmware of BT815
« Reply #17 on: May 10, 2022, 03:42:37 PM »

Hi David,

Sorry for the delay in replying,

We did a further test with a code snippet based on your earlier test and we could see the correct coordinates.
This was with BT817, we will check with BT815 too.

The code used was:

Code: [Select]
int i2c_addr()
{
  return 0x38; // does not matter for my test
}

int setup()
{
  setWAKE(0);
  delay_ms(5);
  setWAKE(1);
  delay_ms(300);
}

void loop()
{
      report_touch(0, 400, 300);
      delay_ms(5); // also tried without those delays and with id 1 as well
      //report_touch(0, 200, 100);
      //delay_ms(5);
}

The application code used was:

Code: [Select]
    uint32_t CoordX = 0;
    uint32_t CoordY = 0;
    uint32_t Coord = 0;

    while(1)
    {
  EVE_LIB_BeginCoProList();                                             
  EVE_CMD_DLSTART();                                                   

  EVE_CLEAR_COLOR_RGB(0, 0, 0);                                           
  EVE_CLEAR(1,1,1);                                                       

  EVE_CMD_TEXT(10, 320, 28, EVE_OPT_FORMAT, "X is %d", CoordX);
  EVE_CMD_TEXT(10, 340, 28, EVE_OPT_FORMAT, "Y is %d", CoordY);

  EVE_DISPLAY();                                                         
  EVE_CMD_SWAP();                                                         

  EVE_LIB_EndCoProList();                                                 
  EVE_LIB_AwaitCoProEmpty();                                             

  Coord = HAL_MemRead32(EVE_REG_CTOUCH_TOUCH0_XY);
  CoordY = (Coord & 0xFFFF);
  CoordX = ((Coord >>16) & 0xFFFF);
    }

Loading the custom code was similar to your description. We loaded it to the co-processor buffer after we had set up the display registers and displayed the first blank screen.

Could you advise if you see the same result if using the touch code and the application code above?
Here is the output:

X is 400
Y is 300


I'm afraid we don't have an ILI2511 available to do detailed debugging. However, as a first pass we think a custom touch code listing similar to this may work based on the datasheet:
If you are able to try it could you let us know how it reacts (and if possible to capture a logic analyser waveform of the I2C when pen-down and pen-up occur) and we can try to work towards getting it running on ILI2511.

Code: [Select]
void i2c_addr()
{
  return 0x41;
}

int setup()
{
  setWAKE(0);
  delay_ms(150);
  setWAKE(1);
  delay_ms(500);
}

void loop()
{
  while (getINT() == 1) // wait for INT to go low
    ;

  i2c_startread(0x10);

  int statusbyte = i2c_read8();

if (statusbyte != 0)
{

  int x0 = i2c_read16be();
  int y0 = i2c_read16be();
  int Pressure0 = i2c_read8();
  if ((x0 & 0x8000) == 0x8000)
    report_touch(0, (x0 & 0xfff), (y0 & 0xfff));

  int x1 = i2c_read16be();
  int y1 = i2c_read16be();
  int Pressure1 = i2c_read8();
  if ((x1 & 0x8000) == 0x8000)
    report_touch(1, (x1 & 0xfff), (y1 & 0xfff));

  int x2 = i2c_read16be();
  int y2 = i2c_read16be();
  int Pressure2 = i2c_read8();
  if ((x2 & 0x8000) == 0x8000)
    report_touch(2, (x2 & 0xfff), (y2 & 0xfff));

  int x3 = i2c_read16be();
  int y3 = i2c_read16be();
  int Pressure3 = i2c_read8();
  if ((x3 & 0x8000) == 0x8000)
    report_touch(3, (x3 & 0xfff), (y3 & 0xfff));

  int x4 = i2c_read16be();
  int y4 = i2c_read16be();
  int Pressure4 = i2c_read8();
  if ((x4 & 0x8000) == 0x8000)
    report_touch(4, (x4 & 0xfff), (y4 & 0xfff));
}
  i2c_stop();
  while (getINT() == 0); // wait for INT to go high

}



Best Regards, BRT Community
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Updating Capacitive Touch Controller Firmware of BT815
« Reply #18 on: May 23, 2022, 10:34:12 AM »

Hi David,

Unfortunately we have found that the custom touch code generated by the tool is not working correctly on BT815 and so is only running on BT817 at this time. It is under investigation at the moment by the authors of the tools. Do you have a BT817 available in order to try your code?

Sorry for the inconvenience caused,

Best Regards, BRT Community
Logged

david

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Updating Capacitive Touch Controller Firmware of BT815
« Reply #19 on: May 30, 2022, 09:11:49 AM »

Thanks for the answer. I will try to test it with a BT817 in the future. In the past I just used the BT815 for testing the touch firmware update. It would be fine for me, if it just works with BT817. I will switch to the newer version then.
Logged

david

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Updating Capacitive Touch Controller Firmware of BT815
« Reply #20 on: June 03, 2022, 03:58:14 PM »

I was able to test it with a BT817 now and the updating of the firmware works for me. So it seems to be an issue just on the BT815. I was able to run my old test code with fixed values and also to test it with another touch controller (to read out a register). So I am fine with just using the BT817 in the future then. For the BT815 I will fallback to host mode.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Updating Capacitive Touch Controller Firmware of BT815
« Reply #21 on: June 07, 2022, 03:39:37 PM »

Hi David,

Great to hear that it is working well on your BT817 and thanks for letting us know,

We will investigate the issue on BT815 compiler too

Best Regards, BRT Community

Logged
Pages: 1 [2]