Hi Bernhard,
Thank you very much for your quick reply.
1. The entire application (minus a few buffers for USB and MSC) is linked to external RAM. See the map file I have attached, and just search for _IRQHandler. I did this by checking the box "Link application to RAM" in the linker. My memory config consists of the following (the other two internal RAM banks are for locations of buffers to make USB faster, as well as update firmare, since this design is intended to be a flashloader).
configMemory[0] = name=SDRAM alias=RAM location=0x28000000 size=0x1000000 sizek=16M bytes flash=false RAM=true defaultRAM=true
configMemory[1] = name=RamLoc32 alias=RAM2 location=0x10000000 size=0x8000 sizek=32K bytes flash=false RAM=true defaultRAM=false
configMemory[2] = name=RamLoc40 alias=RAM3 location=0x10080000 size=0xa000 sizek=40K bytes flash=false RAM=true defaultRAM=false
My heap and stack are also in external SDRAM, as shown in this snippet of the map file:
0x2800abe0 PROVIDE (_pvHeapStart, DEFINED (__user_heap_base)?__user_heap_base:.)
0x29000000 PROVIDE (_vStackTop, DEFINED (__user_stack_top)?__user_stack_top:(__top_SDRAM - 0x0))
2. The clock frequency is 120MHz - both the CPU and SDRAM are running at this rate (see attached jlinkscript file).
3. When I launch a debug session after a cold start (by first applying power to the board, when the board is off), everything works normally. When I disconnect from that session, and start a new one (and subsequent ones) without first powering off and on the board again, no IRQ's fire. For example, I am mostly running the complete usbd_rom_dfu_composite example. I set breakpoints inside any of the IRQ's (which I have temporarily placed debug volatile incrementing variables inside to make sure I can hit a breakpoint) , and evidently none of them will fire anymore. Subsequent disconnects and reconnects of the debugger do not solve this problem. Only a cold boot of the board (removing power and applying power) prior to a debug session seems to resurrect hardware triggering of these handlers. Strangely, I can see in the register IABR (Interrupt active bit register) that indeed, corresponding interrupts should be executing, but are not, and never will be unless I remove power like I stated above and try again. The app marches on as if it is un-interruptable.
4. Interrupts work perfectly the first time I debug from a cold start (I verified this with breakpoints), and I can see the demo code working (PC mounts a drive, and the virtual com port demo works. A second debug session (like described before without removing power first) will produce no drive on the PC, and vcom does not work either.
5. I use LPCXpresso, and debug with a Segger J-Link Ultra+. I have attached my startup script which initializes external SDRAM. I pillaged most of this from an example on the internet, but managed to get it working with my chip. It is possible that I am doing something to interrupts in this script, or the reset procedure is not doing something properly, but my startup code in my application should honestly be overriding all of that. For example, in cr_startup_lpc43xx I do NOT have DONT_RESET_ON_RESTART defined, so everything should be getting reset that can be from software. Note that there appears to be no resetting of the NVIC anywhere. This makes me think there is a bug somewhere in the silicon
6. The clock frequency is set by the jlinkscript at 120 MHz.
cr_startup and sysinit are both the same as what is given in the lpcopen examples. I have stepped over the code in sysinit that assigns the vector table to the contents of register 0xE000ED08, and I can see that it retains the value.
I can't think of anything else that would cause this, and it has become a real head-scratcher.
Thanks again for your time considering this issue.
Regards,
Brad