This appeal is before the Court to determine whether it should be dismissed because the trial court certified that Appellant, Jesse A. Martinez, does not have a right to appeal. See Tex.R.App.P. 25.2(d). Finding that the trial court’s certification is defective, we abate the appeal and order the trial court to enter an amended certification regarding Martinez’s right to appeal the suppression ruling.FACTUAL SUMMARYMartinez was charged by indictment with capital murder. On November 7, 2017, Martinez waived his right to a jury trial and entered a negotiated guilty plea to the lesser-included offense of murder. The plea papers and the record of the guilty plea reflect that in exchange for Martinez’s plea of guilty, the State agreed to recommend a sentence of 30 years’ imprisonment in TDCJID with a deadly weapon finding and dismissal of Count II pursuant to Section 12.45 of the Texas Penal Code.[1] The plea papers do not include a written waiver of the right to appeal.The plea papers contain the standard admonishments regarding a defendant’s limited right to appeal in a plea-bargained case. In the section of the plea papers addressing the recommendation for punishment, Martinez is advised that if the trial court does not follow the plea bargain, he will be allowed to withdraw his guilty plea. The document goes on to explain to Martinez that he only has a limited right to appeal if the trial court follows the plea bargain:If, however, the punishment assessed by the Court in this case does not exceed the punishment recommended by the attorney representing the State of Texas and agreed to by you the Defendant and your attorney . . . the Court must give you permission before you may prosecute an appeal on any matter in the case except for those matters raised by written motion filed and heard prior to trial. [Emphasis added].Martinez placed his signature on this page indicating he had read the document and understood its contents.The record also reflects that Martinez reviewed the trial court’s certification of defendant’s right to appeal before the guilty plea. Martinez signed the certification acknowledging that he had received a copy of the certification and had been informed of his right to appeal. The certification sets forth Martinez’s right to appeal as follows:A defendant in a criminal case has the right of appeal under these rules. The trial court shall enter a certification of the defendant’s right to appeal in every case in which it enters a judgment of guilt or other appealable order. In a plea-bargain case–that is, a case in which the defendant’s plea was guilty or nolo contendere and the punishment did not exceed the punishment recommended by the prosecutor and agreed to by the defendant—a defendant may appeal only: (A) those matters that were raised by written motion filed and ruled on before trial, or (B) after getting the trial court’s permission to appeal. [Citation to Tex.R.App.P. 25.2(a)(2) omitted][Emphasis in orig.].During the guilty plea, the trial court addressed Martinez’s right to appeal:[The Court]: If I do follow the plea bargain, and as set out in State’s Exhibit 2[2]which sets out your rights to appeal in these matters, do you further understand that if the Court assesses a sentence in accordance with that plea bargain, that under Texas law you have no right to appeal?[Martinez]: Yes, Your Honor.[The Court]: And despite the fact that the Court has sentenced you in accordance with the plea bargain, do you further understand that if you decide to appeal, no matter for what reason, before you can appeal you must first obtain permission from the Court? And because the Court followed the plea bargain and sentenced you in accordance therewith, do you further understand that the Court has the right or the law allows the Court the discretion to deny you the permission to appeal? Do you understand that?[Martinez]: Yes, Your Honor. [Emphasis added].The trial court accepted Martinez’s guilty plea and assessed his punishment in accordance with the plea bargain. On the day of the guilty plea, November 7, 2017, the trial court signed the certification stating that this is a plea bargain and Martinez has no right to appeal. Martinez filed notice of appeal on December 8, 2017.After reviewing the trial court’s certification, we sent a letter to the parties asking them to address whether Martinez has a right to appeal. The trial court, on its own motion, conducted a status hearing on the certification issue before either of the parties filed their response. At that hearing, the trial court insisted that Martinez had waived his right to appeal as part of the plea bargain. Martinez’s counsel explained that he was only challenging the suppression ruling on appeal, but the court stated that Martinez could not challenge that ruling without the court’s permission and it refused to grant permission. Both the State and Martinez have filed their responses to our inquiry.DEFECTIVE CERTIFICATION OF THE RIGHT TO APPEALMartinez asserts that the certification is defective because it is contrary to the record. The State concedes that the plea papers do not include a written waiver of the right to appeal, but it argues that Martinez verbally waived his right to appeal during the guilty plea hearing.Rule 25.2(a)(2) requires a trial court to enter a certification of the defendant’s right of appeal each time it enters a judgment of guilt or other appealable order. Tex.R.App.P. 25.2(a)(2). The trial court is required to certify a defendant’s right of appeal by selecting the appropriate box on the certification form contained in the appendix to the Texas Rules of Appellate Procedure. See Tex.R.App.P., App. D; Hargesheimer v. State, 182 S.W.3d 906, 911 (Tex.Crim.App. 2006). The form gives the trial judge five choices: it is not a plea-bargain case and the defendant has the right of appeal; it is a plea-bargain case but matters were raised by written motion filed and ruled on before trial and not withdrawn or waived; it is a plea bargain case but the trial court has given permission to appeal, it is a plea-bargain case in which the defendant has no right of appeal; or it is a case in which the defendant waived his right of appeal. See Tex.R.App.P. App. D; Hargesheimer 182 S.W.3d at 911. The trial court chose the fourth option and certified that this is a plea bargain case and Martinez has no right of appeal.The appeal must be dismissed if a certification that shows the defendant has the right of appeal has not been made part of the record under these rules. Tex.R.App.P. 25.2(d). If the certification is defective, the clerk of the appellate court must notify the parties of the defect so that it can be remedied, if possible. See Tex.R.App.P. 37.1. A defective certification includes one that is “correct in form but which, when compared with the record before the court, proves to be inaccurate.” Jones v. State, 488 S.W.3d 801, 804 (Tex.Crim.App. 2016), quoting Dears v. State, 154 S.W.3d 610, 614 (Tex.Crim.App. 2005). A certification that is contrary to the record before the appellate court is defective. Jones, 488 S.W.3d at 804-05.In a plea-bargained case, the defendant’s right to appeal is limited to (1) those matters raised by written motion and ruled on before trial; or (2) after getting the trial court’s permission to appeal. See Tex.Code Crim.Proc.Ann. art. 44.02 (West 2006);[3] Tex.R.App.P. 25.2(a)(2).[4]Under Article 44.02 and Rule 25.2(a)(2), the defendant’s entry of a negotiated guilty plea does not extinguish his right to appeal the denial of a written motion to suppress that is ruled upon before the guilty plea, and in such a case, the defendant is not required to secure the trial court’s permission to appeal the suppression ruling. Because the trial court has denied permission to appeal, Martinez’s appeal is necessarily limited to those matters raised by written motion and ruled on before the guilty plea hearing. Martinez has made it clear both in the trial court at the status hearing and in his response to our inquiry about the certification that he intends to appeal the denial of his motion to suppress heard and ruled on by the court prior to the guilty plea. The only remaining question is whether Martinez waived his right to appeal the suppression ruling.A criminal defendant in a non-capital case may waive any of the rights secured him by law, including the right to appeal rulings on pretrial motions, if the waiver is made “voluntarily, knowingly, and intelligently.” See Tex.Code Crim.Proc.Ann. art. 1.14(a)(West 2005); Marsh v.State, 444 S.W.3d 654, 660 (Tex.Crim.App. 2014); Ex parte Broadway, 301 S.W.3d 694, 697 (Tex.Crim.App. 2009). A valid waiver of the right to appeal will prevent a defendant from appealing without the consent of the trial court. Monreal v. State, 99 S.W.3d 615, 617 (Tex.Crim.App. 2003).A plea bargain or plea agreement is a contract between the State and the defendant, and they are given great latitude in crafting the terms of the agreement. See Ex parte De Leon, 400 S.W.3d 83, 89 (Tex.Crim.App. 2013); State v. Moore, 240 S.W.3d 248, 251 (Tex.Crim.App. 2007). Once the trial court accepts the plea agreement, it becomes binding on the State and the defendant and both parties are entitled to the benefit of the bargain. See Ex parte De Leon, 400 S.W.3d at 89; State v. Moore, 240 S.W.3d at 251. We apply general contract-law principles to determine the intended content of a plea agreement. Ex parte De Leon, 400 S.W.3d at 89. In determining the terms of the plea agreement, an appellate court must look to both the written agreement and the formal record, and we will imply a term only when necessary to effectuate the intention of the parties. Id.We have reviewed the records of the guilty plea and the status hearing conducted by the trial court on its own motion to determine whether Martinez waived his right to appeal. It is undisputed that waiver of the right to appeal was not an explicit or implicit term of the plea bargain agreement between Martinez and the State. The State argues, however, that the trial court unilaterally made waiver of the right to appeal an additional term of the plea bargain, and Martinez agreed on the record to waive his right to appeal the suppression ruling. The record does not support the State’s position.The trial court’s admonishments to Martinez that his plea of guilty operated as a complete waiver of his right to appeal “under Texas law” and he could not appeal any issue unless he had permission to appeal are incorrect and misleading statements of law. The trial court repeated these erroneous statements of law at the status hearing when it informed Martinez that he could not appeal the suppression ruling without the court’s permission. Under Article 44.02 and Rule 25.2(a)(2), a defendant who enters a negotiated guilty plea has the right to appeal rulings on written pretrial motions and he is not required to obtain the trial court’s permission to appeal. Consequently, the trial court erred by informing Martinez that he was required to secure the court’s permission to appeal the suppression ruling.We also do not agree with the trial court and the State that Martinez’s acquiescence to the trial court’s incorrect statements of law amounted to a valid waiver of the right to appeal the suppression ruling. In order for a waiver of the right to appeal to be valid, it must be made voluntarily, knowingly, and intelligently. A defendant does not waive his right to appeal by merely agreeing with the trial court’s erroneous pronouncement regarding the defendant’s right to appeal. See Sims v. State, 326 S.W.3d 707, 710 n.3 (Tex.App.–Texarkana 2010, no pet.)(defendant’s acknowledgement of inaccurate and misleading admonishment regarding her right to appeal did not constitute a valid waiver of the right to appeal and was irrelevant; it was “nothing more than her acknowledgement of a pronouncement by the trial court.”). Martinez’s agreement with the trial court’s erroneous and misleading statements regarding the unavailability of appeal cannot be said to constitute a voluntary, knowing, and intelligent waiver of the right to appeal.The trial court’s recollection that waiver of the right to appeal was a term of the plea bargain is not supported by the record of the guilty plea hearing. As already noted, the plea papers do not contain a written waiver of the right to appeal. The trial court’s comments made during the guilty plea clearly indicate that the court was attempting to explain to Martinez its understanding, albeit mistaken, of Martinez’s right to appeal “under Texas law” and the effect of his guilty plea on that right. The court never mentioned during this exchange with Martinez that the court was asking him to waive his right to appeal the suppression ruling as a new and additional term of the plea bargain. We conclude that waiver of the right to appeal was not a term of the plea bargain, and Martinez did not voluntarily, knowingly, and intelligently waive his right to appeal the suppression ruling. Consequently, the trial court’s certification that Martinez does not have a right to appeal the suppression ruling is defective because it is contrary to the law and the record before the Court.We abate the appeal and remand the cause to the district court for entry of an amended certification addressing Martinez’s limited right to appeal the suppression ruling. The amended certification should be filed with the trial court clerk no later than January 31, 2018. The amended certification shall be included in a supplemental clerk’s record and filed with this Court no later than February 10, 2018.PER CURIAMJanuary 10, 2018Before McClure, C.J., Rodriguez, and Palafox, JJ.(Do Not Publish)