STM32H563 ThreadX crash during nested interrupt - what's the likely culprit?
So I left my program running overnight, and when I check it this morning, the debug output had stopped. Thankfully, the IDE was still running, and it actually caught the hard fault, and even better, the call stack was intact. Here’s what I saw:

So the IP thread was running, it was waiting on an event flag, another small handler popped, then the Ethernet IRQ popped, and before it could finish execution, the CAN handler popped. The CAN handler checks a queue (with TX_NO_WAIT) for items to transmit, but just before it started executing _tx_queue_receive(), a HardFault occurred.
This is the view from inside _txe_queue_receive():

And this is the view from inside _tx_queue_receive():

Now, I’m not sure if perhaps the program counter hadn’t gotten far enough to populate/adjust the stack so that the local variables look correct, but I can see that _txe_queue_receive() definitely had valid values for queue_ptr, destination_ptr, and wait_option prior to calling _tx_queue_receive().
For reference, here are the CPU registers:

In my linker file, I have _Min_Stack_Size = 0x400 (1 kByte). I’m wondering two things:
One, from an RTOS safety perspective, is it fine that the CAN ISR popped in the middle of the Ethernet ISR? Are there no kernel safety issues surrounding that? Presumably if there were an issue, the solution would be to give ThreadX-interacting ISRs all the same NVIC priority, so that no one ISR could preempt another.
Two, is it more likely that the 1 KB hardware stack was simply exceeded with that large call stack, and I just need to increase the size of the hardware stack to, say, 4 KB to compensate? Appreciate any perspective, thanks.
Dana M.
