I am working on a grad school project that is using CrossWorks to write code for an MSP430F2618. We have began playing around writing sample code but we have run into a problem with interrupts. According to the documentation in CrossWorks the basic format for declaring interrupts is to have __enable_interrupt() in the main function and an interrupt function of the following format:
void handle_timer_interrupt(void) __interrupt[TIMER_VECTOR]
/* Handle interrupt here */
The problem we are having is we would like to test interrupts using the MSP430 Core Simulator. However, we cannot find any examples (sample code or documentation) showing how to write an interrupt that can be triggered from our code, everything refers to events being triggered from hardware only.
a) Is there a way to simulate the system timer and use it to trigger interrupts?
b) Is there a way to create a new TIMER_VECTOR and trigger it from code? Is there a good place we could find examples?
Please sign in to leave a comment.