TSS - problems on TSI0_CH2 PTA1 port

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TSS - problems on TSI0_CH2 PTA1 port

Jump to solution
620 Views
Curro
Contributor III

I'm working on a custom board, K60 + MQX3.8 + IAR + j-link SWD mode.

This board has a 12 touch keyboard.

Because of EMC tests problems I migrate from tsi manage to TSS 3.0.1.

All 12 pads runs ok in tsi mode.

In TSS mode 11 pads are also ok but I have problems with TSI0_CH2 which never runs.

If I touch the pads with the oscilloscope probe I see correct signals on the 11 working fine pads. On TSI0_CH2 pad signal seems pulled up.

I also tried do disable UART0 (PTA1 has UART0_RX in ALT2) because I supposed in conflict, but with no result.

These are my main configurations:

in TSS_SystemSetup.h

#define TSS_N_ELECTRODES                  12         /* Number of electrodes present in the system */

#define TSS_E0_TYPE                   TSI0_CH2

#define TSS_E1_TYPE                   TSI0_CH3

#define TSS_E2_TYPE                   TSI0_CH5

#define TSS_E3_TYPE                   TSI0_CH7

#define TSS_E4_TYPE                   TSI0_CH8

#define TSS_E5_TYPE                   TSI0_CH9

#define TSS_E6_TYPE                   TSI0_CH10

#define TSS_E7_TYPE                   TSI0_CH11

#define TSS_E8_TYPE                   TSI0_CH12

#define TSS_E9_TYPE                   TSI0_CH13

#define TSS_E10_TYPE                  TSI0_CH14

#define TSS_E11_TYPE                  TSI0_CH15

#define TSS_N_CONTROLS              1

#define TSS_C0_TYPE                 TSS_CT_KEYPAD     /* Control type */

#define TSS_C0_ELECTRODES           12                 /* Number of electrodes in the control */

#define TSS_C0_STRUCTURE            cKey0             /* Name of the C&S struct to create */

#define TSS_C0_CALLBACK             hmi_tss_keypad_callback  /* Identifier of the user's callback */

in init_hmi.c

/* TSS ON BOARD keypad */

static const HMI_TSS_INIT_STRUCT hmi_init_table_tss_twrpi_void[]=   

{

        /* UID, FLAG */

        {HMI_BUTTON_1,0},    /* E1 - touch button 1 */

        {HMI_BUTTON_2,0},    /* E2 - touch button 2 */

        {HMI_BUTTON_3,0},    /* E3 - touch button 3 */

        {HMI_BUTTON_4,0},    /* E4 - touch button 4 */

        {HMI_BUTTON_5,0},    /* E5 - touch button 5 */

        {HMI_BUTTON_6,0},    /* E6 - touch button 6 */

        {HMI_BUTTON_7,0},    /* E7 - touch button 7 */

        {HMI_BUTTON_8,0},    /* E8 - touch button 8 */

        {HMI_BUTTON_9,0},    /* E9 - touch button 9 */

        {HMI_BUTTON_10,0},    /* E10 - touch button 10 */

        {HMI_BUTTON_11,0},    /* E11 - touch button 11 */

        {HMI_BUTTON_12,0},    /* E12 - touch button 12 */       

        {0,0}

};

In my application touch task

void touch_task()

{

  bsp_btnled_driver_handle = _bsp_btnled_init(); // BTNLED initialization

  // add callbacks for TSS touch

  btnled_add_clb(bsp_btnled_driver_handle, HMI_BUTTON_1, HMI_VALUE_PUSH, callback_print_push, "3");  

  btnled_add_clb(bsp_btnled_driver_handle, HMI_BUTTON_2, HMI_VALUE_PUSH, callback_print_push, "2");

  btnled_add_clb(bsp_btnled_driver_handle, HMI_BUTTON_3, HMI_VALUE_PUSH, callback_print_push, "1");

  btnled_add_clb(bsp_btnled_driver_handle, HMI_BUTTON_4, HMI_VALUE_PUSH, callback_print_push, "6");

  btnled_add_clb(bsp_btnled_driver_handle, HMI_BUTTON_5, HMI_VALUE_PUSH, callback_print_push, "4");

  btnled_add_clb(bsp_btnled_driver_handle, HMI_BUTTON_6, HMI_VALUE_PUSH, callback_print_push, "5");

  btnled_add_clb(bsp_btnled_driver_handle, HMI_BUTTON_7, HMI_VALUE_PUSH, callback_print_push, "8");

  btnled_add_clb(bsp_btnled_driver_handle, HMI_BUTTON_8, HMI_VALUE_PUSH, callback_print_push, "7");

  btnled_add_clb(bsp_btnled_driver_handle, HMI_BUTTON_9, HMI_VALUE_PUSH, callback_print_push, "9");

  btnled_add_clb(bsp_btnled_driver_handle, HMI_BUTTON_10, HMI_VALUE_PUSH, callback_print_push, "10");

  btnled_add_clb(bsp_btnled_driver_handle, HMI_BUTTON_11, HMI_VALUE_PUSH, callback_print_push, "0");

  btnled_add_clb(bsp_btnled_driver_handle, HMI_BUTTON_12, HMI_VALUE_PUSH, callback_print_push, "11");

  while (1)

  {

    if(FlagPower<0x80)

      btnled_poll(bsp_btnled_driver_handle); /* polls TSS and LWGPIO buttons */

    _time_delay(10);                 /* time for other tasks */

  } 

}

Anyone can please help me...?

Many thanks in advance.

Corrado

0 Kudos
1 Solution
394 Views
Curro
Contributor III

Problem solved.

I added ALT0 setup before calling bsp_btnled_init();

  PORTA_PCR1 = PORT_PCR_MUX(0);      //Enable ALT0 for portA1 ch2 ok 3

  PORTA_PCR2 = PORT_PCR_MUX(0);      //Enable ALT0 for portA2 ch3 ok 2

  PORTA_PCR4 = PORT_PCR_MUX(0);      //Enable ALT0 for portA4 ch5 ok 1

  PORTB_PCR2 = PORT_PCR_MUX(0);      //Enable ALT0 for portB2 ch7 ok 6

  PORTB_PCR3 = PORT_PCR_MUX(0);      //Enable ALT0 for portB3 ch8 ok 4

  PORTB_PCR16 = PORT_PCR_MUX(0);      //Enable ALT0 for portB16 ch9 ok 5

  PORTB_PCR17 = PORT_PCR_MUX(0);      //Enable ALT0 for portB17 ch10 ok 8

  PORTB_PCR18 = PORT_PCR_MUX(0);      //Enable ALT0 for portB18 ch11 ok 7

  PORTB_PCR19 = PORT_PCR_MUX(0);      //Enable ALT0 for portB19 ch12 ok 9

  PORTC_PCR0 = PORT_PCR_MUX(0);      //Enable ALT0 for portC0 ch13 ok esc

  PORTC_PCR1 = PORT_PCR_MUX(0);      //Enable ALT0 for portC1 ch14 ok 0

  PORTC_PCR2 = PORT_PCR_MUX(0);      //Enable ALT0 for portC2 ch15 ok enter 

View solution in original post

0 Kudos
1 Reply
395 Views
Curro
Contributor III

Problem solved.

I added ALT0 setup before calling bsp_btnled_init();

  PORTA_PCR1 = PORT_PCR_MUX(0);      //Enable ALT0 for portA1 ch2 ok 3

  PORTA_PCR2 = PORT_PCR_MUX(0);      //Enable ALT0 for portA2 ch3 ok 2

  PORTA_PCR4 = PORT_PCR_MUX(0);      //Enable ALT0 for portA4 ch5 ok 1

  PORTB_PCR2 = PORT_PCR_MUX(0);      //Enable ALT0 for portB2 ch7 ok 6

  PORTB_PCR3 = PORT_PCR_MUX(0);      //Enable ALT0 for portB3 ch8 ok 4

  PORTB_PCR16 = PORT_PCR_MUX(0);      //Enable ALT0 for portB16 ch9 ok 5

  PORTB_PCR17 = PORT_PCR_MUX(0);      //Enable ALT0 for portB17 ch10 ok 8

  PORTB_PCR18 = PORT_PCR_MUX(0);      //Enable ALT0 for portB18 ch11 ok 7

  PORTB_PCR19 = PORT_PCR_MUX(0);      //Enable ALT0 for portB19 ch12 ok 9

  PORTC_PCR0 = PORT_PCR_MUX(0);      //Enable ALT0 for portC0 ch13 ok esc

  PORTC_PCR1 = PORT_PCR_MUX(0);      //Enable ALT0 for portC1 ch14 ok 0

  PORTC_PCR2 = PORT_PCR_MUX(0);      //Enable ALT0 for portC2 ch15 ok enter 

0 Kudos