How I can use external crystal in mbed api for nrf52_DK

hi , I am getting a problem that how I can mange the micro controller(nrf52832) to use an external crystal.
I think one way is that to write directly in registers.
but the problem is that How I can write in register?
in with library, registers defines?