Crashes on write to ISER

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by IanB on Fri Apr 08 12:57:24 MST 2016
I have an LPC1111 which appears to crash on the write to ISER during the setup code. I say "appears to" because it only does so on certain power supplies, and not with the LPClink connected.

The ADC is set for repeated conversions, and to interrupt when it has finished channel 7, but it sometimes (depending on the power supply it is connected to) it never gets past the write to ISER.

WIthout the LPC link I can only monitor it by making it output pulses on certain pins, and watching them on an oscilloscope.

I also note that when it doesn't crash, it runs the interrupt handler as soon as ISER is written although insufficient time has elapsed for it to have finished the conversion.

Does anyone have any ideas what might be going on?

                LDR R3,=LPC_ADC_BASE                        @ set up A/D for repeated conversions
                LDR R2,=0x137CF                             @ divide by 56, Channels 0,1,2,3,6,7
                STR R2,[R3,CR]
                MOVS R2,#0b10000000                         @ interrupt when AD7 has finished
                STR R2,[R3,INTEN]
                LDR R3,=LPC_GPIO0_BASE                 @ send short pulse to PIO0_2
                MOVS R2,#0
                STR R2,[R3,#0b10000]
                MOVS R2,#0b100
                STR R2,[R3,#0b10000]
                LDR R3,=ISER
                LDR R2,=1<24
                STR R2,[R3]