Although the trial court mistakenly entered a certification of the defendant’s right to appeal in which the court certified that this is not a plea bargain case and the defendant has the right of appeal as to punishment, we have no jurisdiction over the appeal. See Tex. R. App. P. 25.2(a)(2). An agreement that places a cap on punishment is a plea bargain for purposes of Texas Rule of Appellate Procedure 25.2(a)(2). Shankle v. State, 119 S.W.3d 808, 813 (Tex. Crim. App. 2003); Waters v. State, 124 S.W.3d 825, 826–27 (Tex. App.—Houston [14th Dist.] 2003, pet. ref’d) (holding reviewing court lacked jurisdiction where defendant pleaded guilty with a sentencing cap of ten years, even though trial judge mistakenly certified defendant had right of appeal); Threadgill v. State, 120 S.W.3d 871, 872 (Tex. App.—Houston [1st Dist.] 2003, no. pet.) (holding statement in record indicating that there was no agreed recommendation did not convert proceeding to an open plea where plea was entered pursuant to agreed sentencing cap). Because appellant’s plea was made pursuant to a plea bargain, he may appeal only matters raised by a written pretrial motion or with the trial court’s permission. See Tex. R. App. P. 25.2(a)(2). Appellant’s counsel filed a brief in which he concludes the appeal is wholly frivolous and without merit. See Anders v. California, 386 U.S. 738 (1967). Appellant does not challenge any pretrial rulings. The trial court’s erroneous certification that the case is not a plea bargain case does not constitute permission to appeal. See Waters, 124 S.W.3d at 826–27.