Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

RTOS/CC2640R2F: How to configure an interrupt

$
0
0

Part Number:CC2640R2F

Tool/software:TI-RTOS

Hello,

I started with a Simple BLE Peripheral project and I'm trying to add an interrupt that when triggered would call a function that would talk to EEPROM using I2C.  The interrupt fired and generated an event however for some reason I2C writing/reading stopped working. I also noticed BLE stopped advertising after an interrupt fired. 

Is my interrupt not setup correctly?

This is what I did:

// EEPROM IRQ pin configuration table
static PIN_Config SBP_configTable[] =
{
     EEPROM_WIP_IRQ | PIN_INPUT_EN | PIN_PULLUP,
     PIN_TERMINATE
};

hSbpPins = PIN_open(&sbpPins, SBP_configTable);
// Register ISR
PIN_registerIntCb(hSbpPins, EEPROM_WIP_HwiFxn);
// Configure interrupt
PIN_setConfig(hSbpPins, PIN_BM_IRQ, EEPROM_WIP_IRQ | PIN_IRQ_NEGEDGE);
// Enable wakeup
PIN_setConfig(hSbpPins, PINCC26XX_BM_WAKEUP, EEPROM_WIP_IRQ|PINCC26XX_WAKEUP_NEGEDGE);


static void SimpleBLEPeripheral_processAppMsg(sbpEvt_t *pMsg)
{
  switch (pMsg->hdr.event)
  {
    case SBP_STATE_CHANGE_EVT:
      SimpleBLEPeripheral_processStateChangeEvt((gaprole_States_t)pMsg->
                                                hdr.state);
      break;

    case SBP_CHAR_CHANGE_EVT:
      SimpleBLEPeripheral_processCharValueChangeEvt(pMsg->hdr.state);
      break;
    case SBP_NFC_IRQ_EVT:   // this is my interrupt event 
      nfcWipInterrupt();                // NFC WIP interrupt 
    break;

    default:
      // Do nothing.
      break;
  }
}


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>