Set timed SLEEP by means dwt_entersleep

I’m attempting to make timed sleep with my custom firmware. I implemented the operations described in dwt_configuresleepcnt (with a timer set on 1-2), and then those in dwt_configuresleep(DWT_PRESRV_SLEEP | DWT_CONFIG, DWT_WAKE_SLPCNT | DWT_WAKE_CS | DWT_SLP_EN) and everything is correctly set. Then I execute commands described in dwt_entersleep to set a one shot sleep for test, and device get stuck. I thought it was sleeping but instead tens of seconds passed and nothing happens. Since it is a TAG, I expected an initial delay due to sleep, and then it would have ranged as usual!
I also tried to make the device sleeping by using sleepafterTX function, but it looks it ignore it at all, since my TAG ranges as usual. I read interrupts inhibit the sleeping, and once my TAG transmits something an interrupt is generated of course, and I suppose it inhibits the sleeping phase. The problem is that I cannot disable the interrupts since I need to range anyway.
Any idea on my problem?
Thank you