Issue with connecting the nRF24L01 transceiver with nrf52840 BLE Sense board

I have tried with mbed with different CE and CSN pins, but as the OP said, the port disappears when upload is finished. If I press the reset button twice to enter boot mode, the port reappears.
The problem does not seem to occur with any library other than NRFLite.

/*
nrF24    nrf52  
CE    -> D6		D0
CSN   -> D7		D1  (SPI SS)
MOSI  -> D10 		(SPI MOSI)
MISO  -> D9  		(MISO)
SCK   -> D8 		(SPI SCK)
IRQ   -> N.C
VCC   -> 3V3
GND   -> GND
*/

const static uint8_t PIN_RADIO_CE = 7;	// D6
const static uint8_t PIN_RADIO_CSN = 8;	// D7
/* OR*/
const static uint8_t PIN_RADIO_CE = 0;	// D0
const static uint8_t PIN_RADIO_CSN = 1;	// D1