I am searching for solution that my code is stuck in the hal_delay function. I couldnt figure it out exact solution. Indeed, this problem is posted in community many times. When I try to initilize the code form cubeMX and test it on --nucleo-wb55, it worked perfectly fine. However, when I test same code with my custom pcb, it is stuck at hal_delay function. Particularly, I tested USART and I2C on this PCB and both are working well. Additionally I try to initilize a GPIO as an External interrupt, code also stuck.
I tried to increase the priority of systick interrupt and ensure that HAL_InitTick() function called. But it did not work as well. It may be a hardware fault but in that case how USART and I2C work perfectly? If you can suggest any solution or different debugging method, that would be great!
Being stuck in HAL_Delay() suggests systick isn't firing, which suggests you've disabled interrupts or are stuck inside another interrupt handler with same/higher priority. Perhaps investigate those potentials or share the relevant code.
Be aware that priority values are reversed in the sense that a priority value of 0 is the highest priority.
It's unlikely to be a hardware fault.