I watched https://devzone.nordicsemi.com/f/nordic-q-a/33591/softdevice-s140-v6-0-0-how-to-set-the-channel-mask-for-different-channels
Does this work the same way in my situation?(nrf52840, SDK15, ble_peripheral)
Yes, it should be the same procedure for nRF5 SDK v15.2.0.