Welcome to JA
It the radio locked out? This is caused by entering the code wrong a certain number of times.
If the radio is saying wait on it then you will have to reset it by leaving the key in the on posistion until the radio displays code on the screen. Also verify you have the correct code by calling the dealer with your VIN and radio serial number. Once the radio unlocks if you have the correct code you should be able to successfully enter it. Thanks
The radio work with this code before
Then unlock it as specified it may take up to 30 mitutes. The re-enter the code.
still it did not accept the code
You will need to verify this is the correct code. If it is correct and it still will not take then you will have to replace the head unit due to an internal issue. I know that you said it took the code before but just recheck that way you may avoid having to replace the head unit. If you do have to replace it then I would go for an aftermarket unit because it will be a lot cheaper. Thanks