(a) A defendant aggrieved by an unlawful search and seizure may move the court for the return of property, the possession of which is not otherwise unlawful, and to suppress as evidence anything so obtained on the grounds that:
(1) The search and seizure without a warrant was illegal; or(2) The search and seizure with a warrant was illegal because the warrant is insufficient on its face, there was not probable cause for the issuance of the warrant, or the warrant was illegally executed.(b) The motion shall be in writing and state facts showing that the search and seizure were unlawful. The judge shall receive evidence out of the presence of the jury on any issue of fact necessary to determine the motion; and the burden of proving that the search and seizure were lawful shall be on the state. If the motion is granted the property shall be restored, unless otherwise subject to lawful detention, and it shall not be admissible in evidence against the movant in any trial.(c) The motion shall be made only before a court with jurisdiction to try the offense. If a criminal accusation is filed or if an indictment or special presentment is returned by a grand jury, the motion shall be made only before the court in which the accusation, indictment, or special presentment is filed and pending.