Hi jeremyzhou,
Thank you for your support.
I am trying the workaround you suggested, just after the disabling SWD functions I am enabling the internal pull-down using the IOCON function.
Then I am configuring SWD pins as GPIOs (P0_3 input and P0_2 output high). After this in my while loop I am toggling my three leds (P0_8, P0_9, P0_1). Still my problem happens after few resets. Am I missing something or should I connect an external pull-down on P0_4 ?
Is this bug and workaround has been documented anywhere. If it is available can you please provide the link, because I couldn't find this issue in Errata sheet of lpc82x.
Thanks.