This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PTM support: UART0 (P0.2 & P0.3) and keys at P0.0 & P0.1

Other Parts Discussed in Thread: CC2541, CC2540

 

Hi All,

 

I have added PTM mode support to my project and got problem that board stopped processing button inputs.

 

Our HW design is quite similar to CC2541 mini-dk and uses 1.4.0 SDK. P0.0 and P0.1 are connected to two buttons and for PTM support only P0.2 and P0.3 are available for USART on our HW. While adding PTM support I followed TI recommendation http://processors.wiki.ti.com/index.php/PTM so that among other modifications I update dependencies to include HAL_DMA definition.

 

INT_HEAP_LEN=3072

HALNODEBUG

OSAL_CBTIMER_NUM_TASKS=1

HAL_AES_DMA=TRUE

HAL_DMA=TRUE

POWER_SAVING

xPLUS_BROADCASTER

HAL_LCD=FALSE

HAL_LED=FALSE

CC2540_MINIDK

HAL_ADC=TRUE

DC_DC_P0_7

HAL_UART

 

 

IAR linker gave me a warning “Warning[w52]: More than one definition for the byte at address 0x6b in common segment INTVEC. It is defined in module "hal_uart" as well as in module "hal_key"” so that I had to look at TI sources and found that both modules seem to assign two ISR routines to the same interrupt vector 0x6B.

 

This seems to me a configuration problem within TI SDK. So two questions:

  1. Is our desired HW configuration (P0.0 and P0.1 are connected to two buttons and for PTM support P0.2 and P0.3 are for USART) valid?

  2. What is configuration of TI SDK that will allow to achieve this?

 

I have read post http://e2e.ti.com/support/wireless_connectivity/f/538/t/238228 that describe similar problem and propose a solution to create new configuration.

 

We are quite close to production and PTM support is the last feature to add so I’d really appreciate help from TI and community.

 

Thank you and best regards.

ipozd

  • The PTM wiki states that "This interface assumes that UART0, Alt 1 is used." From the chip user's guide, you can see that this means:
    Tx = P0_2
    Rx = P0_3

    So yes, your pins should work.

    Yes, hal_key uses the same ISR as hal_uart. You need to fix this somehow if you are using both by either disabling hal_key or merging the ISR's.
  • Hi Tim,

    Thank you for confirmation.

    'Somehow' sounds promising for me :))))

    We can not disable hal_key since our product has buttons and our goal is to have one production binary supporting functionality of product and PTM for factory tests.

    Our concern that we are very close to MP, so merging of ISR to single one is considered as a risk for us just.

    Do we have any other options except creation of two binaries one test FW with PTM and production FW?

    Thank you and best regards,
    ipozd
  • It appears the two options are either merging the ISR or having two binary images.

    I wouldn't consider merging the ISR as any type of significant risk but I guess that is up to you.