I purchased a module that I encountered during startup. At first I programmed the module via the ST link v2.
Example: E: \ nRF5_SDK_11.0.0_89a8197 \ examples \ peripheral \ blinky \ pca10028 \ s130 \ arm5_no_packs
before programming, Bluetooth was not visible to other devices. After programming, it was not visible to other devices
How can I get the chip back to factory settings with ST Link v2?
Because I feel the memory of the layout is messed up
Did you program the SoftDevice?
"factory setting" is that the Flash is all erased - so simply do an erase-all.
Note that ST-Link, as the name suggests, is an ST product - nothing to do with Nordic. It is not designed, sold, or supported for use with non-ST microcontrollers.
You would make your life simpler using a supported programmer/debugger.
You would make your life simpler using a Nordic Dev Kit - at least until you are familiar with the product and the tools.
And that would give you a "free" J-Link!
For new development I recommend to get an nRF52-DK, the nRF52-DK also support programming and debugging of external hardware (provided that VDD is approx 3V) using the on-board SEGGER J-Link debug out header.
Then following the User Guide of the nRF52-DK to set it up and get started with nRF5 SDK.
No, because the softdevice file was in hex format, I couldn't open it in keil. But when programming, I full erase the chip.
After programming, I don't see any response from the chip.
Yes, the SoftDevice is delivered as a Hex file. You don't need to "open" the hex file - you just program it.
Instructions are in the SDK documentation:
The SoftDevice is the BLE protocol stack - so, without that, you cannot do any BLE stuff.
That's a very old SDK - even for nRF51!
Note that nRF51 are not recommended for new BLE development:
Getting started is always easier if you start with current stuff!