Dwt_readdevid() function is stuck in a loop


I am currently trying to do the simple read dev ID example with the API provided by Qorvo. The code is doing the dwt_probe function before the dwt_readdevid function, and it’s returning me the dev ID 0xDECA0302. When the programme is calling the function dwt_readdevid, I’m still printing 0xDECA0302, but the function doesn’t return in my simple read dev ID example function. If I replace dwt_readdevid for the function to read directly the register of the dev id, it’s returning me with a good dev id, but it’s getting stuck at the next called function, where it’s dwt_checkidlerc(). So my point is: do I need to reset something like a flag to pass all functions by themselves? With an oscilloscope, I can see that I’m transmitting and receiving.