Other Parts Discussed in Thread: OPT3001
Hi.
I am trying to run the CC1350 launhpad example with Sensors devpack.
I am successfully reading Lux from the sensors dev-pack using TI driver i2copt3001.c
However, I do not manage to get to interrupt. I've put breakpoints in interrupt handler and replaced:
GPIOCC26XX_DIO_15 | GPIO_DO_NOT_CONFIG,
With:
GPIOCC26XX_DIO_15 | GPIO_CFG_IN_INT_RISING,
And added the needed structures to CC1350_LAUNCXL.c:
OPT3001_Object OPT3001_object[CC1350_LAUNCHXL_OPT3001COUNT];
const OPT3001_HWAttrs OPT3001_hwAttrs[CC1350_LAUNCHXL_OPT3001COUNT] = {
{
#ifdef BOOSTXL_BASSENSORS
.slaveAddress = OPT3001_SA1,
#else // BOOSTXL_SENSORS
.slaveAddress = OPT3001_SA4,
#endif
.gpioIndex = CC1350_LAUNCHXL_OPT3001_INT,
},
};
const OPT3001_Config OPT3001_config[] = {
{
.hwAttrs = &OPT3001_hwAttrs[0],
.object = &OPT3001_object[0],
},
{NULL, NULL},
};
Where:
/*!
* @def CC1350_LAUNCHXL_GPIOName
* @brief Enum of GPIO names
*/
typedef enum CC1350_LAUNCHXL_GPIOName {
CC1350_LAUNCHXL_GPIO_S1 = 0,
CC1350_LAUNCHXL_GPIO_S2,
CC1350_LAUNCHXL_OPT3001_INT,
CC1350_LAUNCHXL_SPI_SLAVE_READY,
CC1350_LAUNCHXL_GPIO_LED_GREEN,
CC1350_LAUNCHXL_GPIO_LED_RED,
CC1350_LAUNCHXL_GPIO_TMP116_EN,
CC1350_LAUNCHXL_GPIO_SPI_FLASH_CS,
CC1350_LAUNCHXL_SDSPI_CS,
CC1350_LAUNCHXL_GPIO_LCD_CS,
CC1350_LAUNCHXL_GPIO_LCD_POWER,
CC1350_LAUNCHXL_GPIO_LCD_ENABLE,
CC1350_LAUNCHXL_GPIOCOUNT
} CC1350_LAUNCHXL_GPIOName;
Still, I don't manage to stop in the interrupt routine...

