I am recently started using NHS3100 demo for a project. I was trying to get familiar with. I tried many examples and they worked fine. While trying to work with current driving mode I used pin PIO0_11 as FUNC0 output and after that I couldn't access debug mode nor program the card. I assume that changing pin11 changed the SWDIO.
Is there a way I can erase the flash ? I didn't make any waiting time before changing the pin so all the waiting is happening after. I don't know if there is a different boot mode or somthing.
Thank you in advance.
There are different ways to recover depending on the firmware currently present in the flash memory. If there is sufficient time after leaving the bootloader and re-assigning the function of one of the debug pins, you will be able to halt the core and reflash.
There is some documentation available about this in the SDK under <SDK>/docs/firmware.html > SW Debug Considerations.
The demo applications show different ways to help you avoid bricking your IC:
In general, all these measures show how to increase the window within which it is possible for a debugger to connect to the core. As said by Daniel, Flash Magic can be used to revive an IC. It is much faster than MCUXpresso and requires a much shorter break-in time window. You can also use a J-Link Base debugger and the corresponding command line interface.
It is possible all your tries will fail. Replacing the IC is then your unfortunate last solution. Be sure to add some kind of (potential) delay at the startup before experimenting, to avoid these problems in the future.