Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
I have found that InterrupIn is not working for the LPC1114, please see my simple test code below,
#include "mbed.h" InterruptIn Irq(dp17); DigitalOut trig(dp14); void My_IRQ_Handler(void); SPI device(dp2, dp1, dp6); // mosi, miso, sclk Serial pc(USBTX, USBRX); int main() { device.format(8,1); device.frequency(1000000);//Test at 1MHz pc.baud(115200); Irq.rise(&My_IRQ_Handler);//Call handler if rising edge detected trig = 0;//Start value for trigger, all trig values can be reversed for Irq.fall printf("Simple InterruptIn test\r\n"); while(1){ wait_ms(500); trig = 1;//Trigger an event } } void My_IRQ_Handler(){ printf("Interrupt handler called\r\n");//Visual sanity check int response = device.write(0x55);//Dummy write wait_ms(10); response = device.write(0xAA);//Dummy write wait_ms(10); trig = 0; //Reset the trigger }Can someone look at this?
Dave.