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.

CC2543: ISR #pragma confusion

Part Number: CC2543

For the CC2543, what is the difference between "#pragma vector = P0INT_VECTOR" and "#pragma vector = P1INT_VECTOR"?

I spent a while today debugging why my ISR for the latter (P1INT_VECTOR) was not triggering.  Turned out that a function in another file had P0INT_VECTOR defined, and apparently that function was triggering for my desired interrupt.  Shouldn't those two pragmas result from different interrupts/events?

I'm basing my code off from the "io_in" example, which uses a Port 0 pin for the interrupt and defines P1INT_VECTOR only.  

In my case, I can comment out the P0INT_VECTOR function and things work fine.  However I'm confused why there was a conflict in the first place.

  • Hello,
    At first glance it seems like there is an error in the example source io_in.c.
    I guess P0INT_VECTOR should be used instead of P1INT_VECTOR because it is a pin on port 0 that is configured to generate interrupt.
  • If using the PER (packet error rate) example code, be aware that the file per_test_cc254x_query.c defines a P0ISR_VECTOR function. This can intercept the interrupt depending on the compilation order.