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.

CCS/BOOSTXL-CC1120-90: CCS/MSP430F5529 + 1120-1190 Booster Pack: How to use Port 1/2 interrupts with SIGFOX Demo Project (TI_SIGFOX_FCC_css_project)

Part Number: BOOSTXL-CC1120-90


Tool/software: Code Composer Studio

Hi,

I would like to use LPM3 with port1/2 interrupts in MSP430F5529 LP together with 1120-1190 Booster pack using TI Sigfox Demo project for Boosterpack. I want MCU to go to lpm3 and only wake up with button Launchpad P1.1 and P2.1 interrupts and send Sigfox frames using library functions.

I have imported the project I received from Sigfox for the LP  and tried the AT_command & button press polling demos, they are working properly. I can send and receive sigfox messages successfully.

But I would like to use interrupts in my project as I described above, when I switched the button press demo to use interrupts instead of polling (this switch is provided in code) there are some problems.  I asked this question to Sigfox support first and they directed me to ask TI (also posted this to MSP430 forum but I was directed to try Sub 1 Ghz forum).
There is a switch in bsp_key.c to use interrupts which is a directive called BSP_KEY_NO_ISR. By default this is defined so it does not use interrupts, when I comment that out it switches to use interrupts instead of polling (it is described in the brief of the code):
#ifndef BSP_KEY_EXCLUDE



/**************************************************************************//**

* @addtogroup BSP

* @{

******************************************************************************/


//#define BSP_KEY_NO_ISR


/******************************************************************************

* INCLUDES

*/

#include "bsp.h"

#include "bsp_key.h"


//#include "ti_sigfox_library\*"

//#include "sigfox_api.h"

#ifndef BSP_KEY_NO_ISR

#include "io_pin_int.h"         // Access to GPIO pin specific ISRs

#endif // BSP_KEY_NO_ISR


#include "driverlib.h"

//#include "hal_digio2.h"


/******************************************************************************

* DEFINES

*/

You also need to call bspKeyInit with BSP_KEY_MODE_ISR argument:
bspKeyInit(BSP_KEY_MODE_ISR);

When I did those changes project did not compile because io_pin_int.h was missing from project, as you can see above it is included if BSP_KEY_NO_ISR is not defined. It looks like the interrupt option is given in code but this project was not tested properly for interrupts.

Here is a summary of the problem:
1) To use interrupts in SIGFOX_DEMO_button_press, "#define BSP_KEY_NO_ISR" statement in bsp_key.c needs to be commented out and bspKeyInit function in sigfox_demo.c/SIGFOX_DEMO_init_mcufunction needs to be called with 'BSP_KEY_MODE_ISR' argument (this is described in code brief). I did these changes, but the project did not compile since "io_pin_int.h" header file included in bsp_key.c  is missing from the project (this is the original project sent by Sigfox after providing them the device id).
2) Then I found the CC1120 Easylink source code from the TI website which includes all bsp and io_pin_int files. I have added io_pin_int.h and io_pin_int.c files to the project. (please see screenshot below for the directory structure of the project).This time project went pass the compile phase but failed in linking saying PORT1_VECTOR  and PORT2_VECTOR interrupt vectors are already defined in TI_SIGFOX_Lib_FCC.lib and redefined in io_pin_int.c:

<Linking>
error #10056: symbol "__TI_int47" redefined: first defined in "./bsp/io_pin_int.obj"; redefined in "../ti_sigfox_library/TI_SIGFOX_lib_FCC.lib<hal_digio2.obj>"
error #10056: symbol "__TI_int42" redefined: first defined in "./bsp/io_pin_int.obj"; redefined in "../ti_sigfox_library/TI_SIGFOX_lib_FCC.lib<hal_digio2.obj>"
error #10010: errors encountered during linking; "TI_SIGFOX_FCC_ccs_project.out" not built

Apparently PORT1 and PORT2 vectors are defined somewhere in the TI Sigfox library. Since it is pre compiled I can't check or modify Sigfox library file. If I comment out PORT1 and PORT2 interrupt vectors from io_pin_int.c the project builds but custom interrupts registered don't work because there is no connection between the port interrupts vectors in library and my custom interrupt functions registered in bsp_key.c.
I tried with both TI 4.4.8 and 16.9.0 LTS compilers but didn't make any difference.
I am wondering whether or not there is a way to register custom interrupt functions to the ISR defined in Sigfox library or any other solution.Is it possible to get some help and guidance in this problem?

Thanks a lot for help