cancel
Showing results for 
Search instead for 
Did you mean: 

STMPE610 - cant read data

ykein
Associate

im using the feather nrf52832 with the featherwing.

i can read the ID by sending 0x00 as [0x80,0x81,0x00] = getting 0x0811

i tried to do the same with TSC_DATA_X 0x4D , but i can read any data from the sensor.

my init is :

  writeRegister8(SYS_CTRL2, 0x0C);   // Enable TSC and ADC Blocks

  writeRegister8(INT_EN, 0x01);     // TOUCH_DETECT-Interrupt are enabled

  writeRegister8(ADC_CTRL1, 0x49);   

  writeRegister8(ADC_CTRL2, 0x01);   // ADC Clock = 3.25 MHz

  writeRegister8(GPIO_ALT_FUNCT, 0x00);

  writeRegister8(TSC_CFG, 0x9A);     // Panel driver settling time: 500us

  writeRegister8(FIFO_TH, 0x01);     // Not zero value

  writeRegister8(FIFO_STA, 0x01);     // Clear the FIFO Memory Content

  writeRegister8(FIFO_STA, 0x00);     // FIFO back to operation mode

  writeRegister8(TSC_FRACT_XYZ, 0x07);// Data Format for Z-Value

  writeRegister8(TSC_I_DRIVE, 0x01);  // Choose 20mA driving channel

  writeRegister8(TSC_CTRL, 0x03);   // Enable Device, No tracking index, X, Y, Z mode

  writeRegister8(INT_STA, 0xFF);    // Clear all interrupt status

  writeRegister8(INT_CTRL, 0x03);   // Enable the interrupts

  // define initial Touch Window

  writeRegister16(WDW_TR_X, 0x0FFF);  // Top Right X

  writeRegister16(WDW_TR_Y, 0x0FFF);  // Top Right Y

  writeRegister16(WDW_BL_X, 0x0000);  // Bottom Left X

  writeRegister16(WDW_BL_Y, 0x0000);  // Bottom Left Y

0 REPLIES 0