
957 S.W.2d 145 (1997)
Jose Cruz DELATORRE, Appellant,
v.
The STATE of Texas, Appellee.
No. 03-97-00121-CR.
Court of Appeals of Texas, Austin.
November 13, 1997.
Rehearing Overruled December 11, 1997.
*147 W.V. Dunnam, Jr., Waco, for Appellant.
Arthur Cappy Eads, District Attorney, James T. Russell, Administrative Assistant, Belton, for Appellee.
Before POWERS, ABOUSSIE and B.A. SMITH, JJ.
SMITH, Justice.
Pursuant to a plea bargain agreement, Appellant Jose Cruz Delatorre pled no contest to manslaughter and was sentenced to eleven years' imprisonment. Delatorre appeals the judgment in several points of error contending that he has a general right to appeal and that his plea was entered involuntarily. Additionally, he attempts to appeal a matter raised in a written pretrial motion. We will affirm the judgment of the trial court.

FACTUAL AND PROCEDURAL BACKGROUND
On May 1, 1996, Delatorre was charged by indictment for causing the death of Kathryn Mayes by intoxication manslaughter and manslaughter. While the State amended the indictment twice, both amendments retained the charges of intoxication manslaughter and manslaughter. At all times, the paragraph charging manslaughter claimed that Delatorre did "recklessly cause the death of an individual" and in doing so did "use a deadly weapon, to-wit: a motor vehicle." In response, Delatorre twice moved to quash the indictment, claiming that the paragraph charging manslaughter failed to allege reckless acts but instead alleged negligent acts. The trial court denied both motions to quash.
On December 2, 1996, Delatorre appeared before the court. The court admonished the defendant who then pled no contest to the manslaughter paragraph of the indictment, pursuant to a plea bargain agreement. After determining that his plea was free and voluntary, the court accepted Delatorre's plea of no contest to manslaughter. The State then entered into evidence, without objection, a judicial stipulation. In the stipulation the defendant admitted that he did "recklessly cause the death of an individual ... and use a deadly weapon...." The stipulation was signed by Delatorre and his attorney. After finding sufficient evidence to convict Delatorre of manslaughter, the court withheld its finding of guilt and recessed the case for sentencing. On January 2, 1997, the court found Delatorre guilty of the offense of manslaughter with a deadly weapon. The court then accepted and agreed to follow the plea agreement and sentenced the defendant to eleven years' confinement in the Texas Department of Criminal Justice.
The plea bargain agreement stated, subject to the approval of the court, that:
in exchange for a plea of nolo contendere to MANSLAUGHTER WITH A DEADLY WEAPON, the State agrees to recommend and does recommend in complete fulfillment of all promises that Defendant be sentenced to a term of no more than eleven (11) years confinement.... Defendant shall not file nor perfect any direct appeal of defendant's conviction in this cause. Defendant shall not file any motion in arrest of judgment nor shall defendant seek permission of the court to file any direct appeal.
The agreement, which was dated December 2, 1996, was signed by Delatorre, his attorney, and the State's attorney. Additionally, both the defendant and his attorney signed an addendum which stated:
[Defendant] further understand[s] if the punishment assessment by the Court does not exceed the punishment recommended by the State and agreed to by [defendant], that the Court must give its permission before [defendant] may prosecute an appeal of this case except for those matters raised by written motion filed prior to trial which were ruled on by the court.
Delatorre appealed his conviction and sentence by general notice on January 23, 1997. He did not then nor does he now claim the *148 trial court granted him permission to appeal. On February 13, 1997, he filed an amended notice, specifying as a ground for appeal the trial court's earlier order overruling his pretrial motion to quash the indictment. Delatorre now contends that (1) he has a general right to appeal; (2) his plea was rendered involuntarily because the trial court failed to properly advise him; (3) the trial court erred in overruling his motion to quash the indictment; and (4) the evidence was insufficient to sustain a guilty finding.

DISCUSSION
Right to Appeal
First, this Court must decide whether Delatorre has a general or limited right to appeal. Generally, a felony defendant who pleads no contest and whose sentence does not exceed the period recommended in the plea bargain is not allowed to appeal any matter without the trial court's permission except rulings on pretrial motions and jurisdictional issues. See Tex.R.App. P. 40(b)(1)[1]; Lyon v. State, 872 S.W.2d 732, 736 (Tex.Crim.App.), cert. denied, 512 U.S. 1209, 114 S.Ct. 2684, 129 L.Ed.2d 816 (1994); Moss v. State, 938 S.W.2d 186, 189 (Tex.App. Austin 1997, pet. ref'd). Recently the court of criminal appeals decided that a challenge to the voluntariness of a plea is an exception to the restrictive proviso of Rule 40(b)(1). Flowers v. State, 935 S.W.2d 131, 133-34 (Tex.Crim.App.1996). Therefore, a defendant who pleads no contest pursuant to a plea bargain agreement may, without the trial court's permission, challenge by general notice of appeal (1) jurisdictional errors, and (2) nonjurisdictional errors that affect the voluntariness of his plea. See Moss, 938 S.W.2d at 189. A defendant may also appeal pretrial rulings by special notice. See Tex. R.App. P. 40(b)(1).
In his first point of error, Delatorre claims he has a general right to appeal because his plea is not governed by Rule 40(b)(1). Under the rule, a defendant who enters a plea pursuant to a plea bargain agreement has a limited right of appeal when the punishment assessed does not exceed the punishment recommended by the prosecutor and agreed to by the defendant. See Tex. R.App. P. 40(b)(1).[2] In this case, the State recommended that the defendant be sentenced to a term of "no more than eleven (11) years confinement." Delatorre now complains the recommendation was not specific enough to comply with Rule 40(b)(1); he maintains that the State must recommend a finite period, such as "eleven years," rather than specifying a cap of "no more than eleven years." We find nothing in the rule's language which indicates a plea agreement must contain a specific period rather than a cap. Rule 40(b)(1) states only that the court's sentence shall not exceed the "punishment recommended." Id. In the present case, the eleven-year sentence did not exceed the punishment recommended by the State.
Nor do we find any Texas case that interprets the language of Rule 40(b)(1) to restrict the State's recommendation to a finite period. To the contrary, a plea bargain consists of the State making certain concessions, such as agreeing to recommend less than the full range of punishment available. Whether the State recommends a finite period or a period with a cap is irrelevant in light of the purpose of a plea bargain, which is to foster a negotiated agreement between the State and the defendant. See Salazar v. State, 773 S.W.2d 34, 40-41 (Tex.App. Houston [14th Dist.] 1989, pet. denied) (Brown, C.J., concurring) (agreement as to specific punishment unnecessary because *149 agreement as to punishment the State was to recommend complies with Rule 40(b)(1), which only requires that punishment assessed does not exceed punishment recommended by prosecutor) (original emphasis); see also Alfaro v. State, 904 S.W.2d 173, 174 (Tex.App.San Antonio 1995, no pet.) (sentence of thirty years did not exceed plea agreement that contained cap of thirty years). We hold that the State's recommendation need not be a finite period in order for the underlying plea agreement to be valid and comply with Rule 40(b)(1).
Delatorre cites Eubanks v. State and Eaglin v. State, but they do not support his contention that the recommended punishment must be a specific period. Eubanks, 599 S.W.2d 815 (Tex.Crim.App.1980); Eaglin, 843 S.W.2d 153 (Tex.App.Houston [14th Dist.] 1992, pet. ref'd). In Eubanks, the court found that while the defendant's attorney had signed the agreement, the defendant had never personally agreed to the recommended punishment and this invalidated the plea agreement. 599 S.W.2d at 816. In Eaglin, the court found that the State never recommended any punishment but instead reserved the right to argue for a sentence. 843 S.W.2d at 154-55. No valid underlying agreement was found there either. Id. In the present case, the State recommended a punishment of no more than eleven years and the defendant personally agreed to it. The court's punishment did not exceed that recommendation; therefore, Delatorre's right to a general appeal cannot stand on the ground that the plea agreement did not comply with Rule 40(b)(1).
Additionally, Delatorre claims that even if the plea agreement had conformed with Rule 40(b)(1), he is not precluded from a general appeal because he never agreed to waive his right to appeal. A criminal defendant may waive many rights he enjoys, including the right to appeal. See Smith v. State, 858 S.W.2d 609, 611 (Tex.App.Amarillo 1993, pet. ref'd) (citing Faulder v. Hill, 612 S.W.2d 512, 514 (Tex.Crim.App.1980)). A written or oral waiver prevents a defendant from appealing as long as the waiver was made knowingly and intelligently and with certainty as to what punishment would be assessed. See Ex parte Thomas, 545 S.W.2d 469, 470 (Tex.Crim.App.1977); Doyle v. State, 888 S.W.2d 514, 518 (Tex.App.El Paso 1994, pet. ref'd); Smith, 858 S.W.2d at 611.
At the sentencing hearing, the court stated:
I will advise you that in accordance with your plea agreement because I have followed that, that your agreement was that you would not file or perfect any appeal of the conviction in this case and I will ask you if you want me to go ahead and sign and accept the waiver of your appellate rights?
Delatorre answered "yes." The court then questioned the defendant's attorney who answered that in recognition of the court's decision he was bound by the plea bargain but that the defendant may want to file a motion for new trial. After some discussion, the court again asked Delatorre's attorney about the "matter of the appeal"; the attorney stated that Delatorre wanted to talk to another lawyer. Delatorre claims this testimony demonstrates that he never waived his general right to appeal. To the contrary, Delatorre personally waived his right to appeal.
The record further supports that a knowing and voluntary waiver was made. Before accepting the defendant's plea, the trial court advised him of his constitutional rights and admonished Delatorre, stating the range of punishment. After making inquiries to both the defendant and his attorney, the court determined Delatorre was mentally competent. Only after the court sentenced him did Delatorre waive his right to appeal. A waiver may be premature if made at a time when the defendant had no way of knowing with certainty the punishment to be assessed. See Smith, 858 S.W.2d at 612 (citing Thomas, 545 S.W.2d at 470). The defendant here voluntarily waived his right to appeal with full knowledge of his sentence. We overrule point of error one and hold that Delatorre does not have a general right to appeal but has one that is limited under Rule *150 40(b)(1).[3]
Voluntariness of the Plea
In points of error two through five, Delatorre contends he entered his plea involuntarily because the trial court failed to comply with article 26.13, which codifies the constitutional due process requirement that a plea must be made freely, knowingly, and voluntarily. See Tex.Code Crim. Proc. Ann. art. 26.13(b) (West 1989); Medford v. State, 766 S.W.2d 398, 400 (Tex.App.Austin 1989, pet. ref'd). A defendant who enters a plea may always appeal the issue of voluntariness. See Flowers, 935 S.W.2d at 133-34. Specifically, Delatorre claims the court did not properly admonish him as required by subsections one and four of article 26.13 and did not properly advise him as to certain legal aspects and consequences of his plea. Article 26.13 states:
(a) Prior to accepting a plea of guilty or a plea of nolo contendere, the court shall admonish the defendant of:
(1) the range of the punishment attached to the offense;
...
(4) the fact that if the defendant is not a citizen of the United States of America, a plea of guilty or nolo contendere for the offense charged may result in deportation, the exclusion from admission to this country, or the denial of naturalization under federal law;
...
(b) No plea of guilty or nolo contendere shall be accepted by the court unless it appears that the defendant is mentally competent and the plea is free and voluntary.
(c) In admonishing the defendant as herein provided, substantial compliance by the court is sufficient, unless the defendant affirmatively shows that he was not aware of the consequences of his plea and that he was misled or harmed by the admonishment of the court....
Tex.Code Crim. Proc. Ann. art. 26.13. In determining whether a plea is voluntary, a reviewing court examines the whole record. See Crawford v. State, 890 S.W.2d 941, 944 (Tex.App.San Antonio 1994, no pet.).
A. Noncitizen Status
Delatorre claims the trial court did not advise him that his plea may affect his status as a noncitizen in the United States. After determining that the defendant was not a United States citizen, the judge stated:
Do you understand, Mr. Delatorre, that because you are not a citizen of the United States that the immigration and naturalization department could have some determination on your status. They could revoke your status, they could deport you, they might do nothing at all, but your status in this country is subject to review by the immigration and naturalization department and based on your plea of no contest, if you do that, that is strictly up to the immigration department, not to this court to determine your status in this country.
(Emphasis added). The defendant responded "yes." Although the court's admonishment does not follow the statute precisely, we find it substantially complies. To substantially comply with article 26.13(a), a trial court need not follow any "particular form or procedure when admonishing an accused." Harris v. State, 887 S.W.2d 482, 484 (Tex. App.Dallas 1994, no pet.) (citing Williams v. State, 770 S.W.2d 81, 82 (Tex.App.Dallas 1989, no pet.)).
In Garcia v. State, the appellate court found substantial compliance when the trial judge merely stated that upon a guilty plea, the defendant could be sent back to his original country. 877 S.W.2d 809, 813 (Tex. App.Corpus Christi 1994, pet. ref'd). Although the statement did not fully encompass the requirements of article 26.13, it substantially complied because it included the most *151 severe action which could have befallen the defendant. See id. at 813. Here, the trial court warned Delatorre that his temporary residence status could be revoked and he could be deported. The court did not totally fail to admonish the defendant. See Morales v. State, 872 S.W.2d 753, 754-55 (Tex.Crim. App.1994). We find the trial court did substantially comply with article 26.13 by admonishing Delatorre that his plea could severely affect his status as a noncitizen.
Once substantial compliance is found, the burden shifts to the defendant to affirmatively show that he entered his plea without understanding the consequences of his action and that he suffered harm. See Hughes v. State, 833 S.W.2d 137, 140 (Tex. Crim.App.1992); Harris, 887 S.W.2d at 484. The above testimony indicates that Delatorre understood the consequences of pleading no contest as a noncitizen. In addition, the defendant has made no affirmative showing that the court's admonishments misled or harmed him. We overrule point of error two.
B. Range of Punishment
Delatorre claims the trial court did not properly advise him on the range of punishment. At trial the judge stated:
You understand that you are charged with the offense of intoxication manslaughter and manslaughter and that these are I think second degree felonies and punishable by two years to twenty years in the penitentiary and a fine of up to $10,000 could be assessed in that case. And the offense of manslaughter is a second degree felony as well, you understand that is punishable by two years to twenty years in the penitentiary and a fine of up to $10,000 could be imposed. You understand that?
Delatorre answered "yes." We find the court's admonishment did substantially comply with article 26.13, which requires only that the defendant be advised of the "range of punishment attached to the offense." Tex. Code Crim. Proc. Ann. art. 26.13 (West 1989). The charging indictment alleged the offenses of intoxication manslaughter and manslaughter. Under the Penal Code, both intoxication manslaughter and manslaughter are second degree felonies, each punishable by two to twenty years of confinement and a fine of no more than $10,000. Tex. Penal Code Ann. §§ 49.08, 19.04, 12.33 (West 1994). The trial court properly stated the range of punishment attached to each offense, after which the defendant pled no contest to manslaughter only. At the time he pled, Delatorre was fully aware of the punishment range attached to manslaughter.
Substantial compliance will be found even when the wrong range is given as long as the punishment assessed is within the range given in the admonishment and the actual range of punishment under the Penal Code. See Rodriguez v. State, 850 S.W.2d 603, 608 (Tex.App.El Paso 1993, no pet.) (substantial compliance found when plea papers gave range of 5 to 99 years confinement but court referred to charge stated in indictment which had range of 2 to 20 years and defendant was actually sentenced to 10 years). In the present case, Delatorre was sentenced to eleven years, the cap recommended in the plea agreement. The eleven-year term is also within the range of punishment stated by the trial court and in the Penal Code. We hold the trial court did substantially comply with article 26.13 in regard to the range of punishment.
Again, the burden shifts to the defendant to show that he was misled or harmed. See id.; Hughes, 833 S.W.2d at 140. Delatorre's sentence adhered strictly to the plea agreement, which was signed by both the defendant and his attorney. Delatorre responded to the trial court's inquiry that he understood the range of punishment and his attorney ultimately concurred with his plea before the trial court accepted it. There is nothing in the record to indicate that the defendant was confused or harmed by the trial court's admonishment. We overrule point of error three.
C. Notice of the True Nature of the Charge
In point of error four, Delatorre contends the trial court failed to give him, prior to accepting his plea, real notice of the true nature of the charge, specifically the legal definition of recklessness as an element of *152 manslaughter. He claims the trial court should have advised that in order for an act to be reckless it must be done with "awareness but with a conscious disregard that a substantial and justifiable risk that the circumstances exist or the result will occur and that the risk must have been of such a nature and degree that it constituted a gross deviation from the standard of care that an ordinary person would exercise under the circumstances." He contends such failure by the trial court disabled Delatorre from entering a voluntary plea because he did not know and understand the actual elements of the offense.
In viewing the whole record, we find Delatorre did in fact understand the elements of the offense and did enter his plea voluntarily. The indictment, the plea bargain agreement, and the judicial stipulation all specifically include recklessness as an element of manslaughter. The stipulation, signed by Delatorre and his attorney, states in pertinent part:
... I did then and there: RECKLESSLY CAUSE THE DEATH OF AN INDIVIDUAL... AND I, THE SAID JOSE CRUZ DELATORRE, DO FURTHER PRESENT THAT DURING THE COMMISSION OF THE OFFENSE ALLEGED ABOVE, DID THEN AND THERE USE A DEADLY WEAPON, TO-WIT: A MOTOR VEHICLE....
Additionally, the defendant signed an Agreement to Stipulate Upon a Plea of Nolo Contendere that "[defendant] understands the elements of [the offenses]." The record reveals the trial court made a substantial effort to ensure that the defendant understood the proceedings, that he was mentally competent, that no one had threatened him, and that his plea was free and voluntary. Before he pled no contest to manslaughter, the trial court properly admonished Delatorre regarding his noncitizen status and the range of punishment. Upon a showing of proper admonishment, we may presume the defendant entered his plea knowingly and voluntarily. See Soto v. State, 837 S.W.2d 401, 405 (Tex. App.Dallas 1992, no pet.). The evidence does not support the defendant's theory that he entered his plea involuntarily because he did not know and understand the elements of the offense.
The trial court is not required to advise the defendant of every aspect of law relevant to his case, including the legal definition of "recklessness." See Rose v. State, 465 S.W.2d 147, 149 (Tex.Crim.App.1971). Requiring the court to provide a legal definition of the elements of the offense charged would be akin to requiring the court to act as legal counsel for the defendant; such is not the trial court's function. See id. In the present case, Delatorre was fully aware that recklessness was an element of the offense to which he pled. In light of the evidence and the foregoing discussion in which we found substantial compliance with article 26.13, and that defendant was not harmed or misled by the trial court, we hold Delatorre did knowingly and willingly enter a plea of no contest to manslaughter. We overrule point of error four.
D. Consequence of His Plea
The purpose of article 26.13 is to assure that the defendant does not plead guilty or no contest without a full understanding of the charges against him and the consequences of his plea. See Basham v. State, 608 S.W.2d 677, 678 (Tex.Crim.App. 1980). In his fifth point of error, Delatorre claims the trial court failed to advise him of the consequences of his plea, specifically his admission to using a deadly weapon, which rendered him ineligible for parole until he served one-half of his sentence. He claims that the trial court's admonishment came only after it had already sentenced him, thereby causing his plea to be involuntary. Again, we must look at the totality of the circumstances to determine if Delatorre understood the consequences of his plea. See Crawford, 890 S.W.2d at 944.
Prior to his plea, the defendant was fully aware that the offense to which he pled contained the factor "use of a deadly weapon" because both the indictment and plea agreement contained those terms. We hold that Delatorre was informed of and understood the range of punishment which could result from a guilty plea to manslaughter with a deadly weapon. The Agreement to *153 Stipulate states that "[defendant] understands the elements of [the offenses] as alleged in the indictment and the consequences of a plea of nolo contendere including the minimum and maximum punishment provided by law." (Emphasis added). At trial, the court asked the defendant if he had read and understood the Agreement to Stipulate; Delatorre replied "yes." The trial court was not required to instruct Delatorre on every aspect of the law pertinent to his case, such as mandatory time before probation. See Rose, 465 S.W.2d at 149. We find no evidence to support the defendant's theory that he did not understand the consequences of his plea. Rather, the entire record shows that Delatorre was properly admonished, and that he was aware of and understood all the possible ramifications of the offense to which he pled no contest. Because his plea was entered voluntarily regarding his understanding of the consequences, we overrule point of error five.
Pretrial Motion
In point of error six, Delatorre claims the trial court erred in overruling his pretrial motion to quash the second paragraph of the indictment. Under Rule 40(b)(1), a defendant who pleads no contest pursuant to a plea bargain agreement has limited rights of appeal which include the right to appeal a matter raised in a written pretrial motion. See Tex.R.App. P. 40(b)(1). However, the notice of appeal must specify that the matter was raised in such a fashion. Id. Delatorre appealed by general notice on January 23, 1997. On February 13, 1997, he amended his appeal and raised as error the trial court's order denying his motion to quash the indictment. We find that Delatorre did not timely perfect his Rule 40(b)(1) appeal.
In a criminal case, a defendant perfects an appeal when he files notice within thirty days after the day sentence is imposed. See Tex.R.App. P. 26.2(a)(1) (Former Rule 41(b)(1)). Although Delatorre's general appeal was within the thirty-day period, his amended appeal was not. An amended appeal specifying a written pretrial motion as a ground for appeal is untimely if not filed within thirty days of sentencing, regardless of the timeliness of the general appeal. See Jones v. State, 796 S.W.2d 183, 186 (Tex. Crim.App.1990) (filing amended notice of appeal which specifies matters raised in pretrial motion was untimely when filed over forty-five days after sentencing even though general notice was timely). Delatorre filed his amended notice more than thirty days after his sentencing on January 2, 1997. Consequently, his specific appeal was untimely and therefore this Court is unable to entertain his appeal of the trial court's ruling on his motion to quash the indictment. Id. at 187; Berrios-Torres v. State, 802 S.W.2d 91, 94 (Tex.App.Austin 1990, no pet.) (failing to file notice in compliance with Rule 40(b)(1) renders appeal defective for purposes of appealing pretrial motion). We overrule point of error six.

CONCLUSION
Because the court sentenced Delatorre pursuant to a plea of no contest and in accordance with a valid underlying plea bargain agreement, we hold the defendant has a right to appeal as limited by Rule 40(b)(1). However, we must preclude his appeal of a written pretrial motion because his amended notice was untimely. While Delatorre may appeal the remaining issue of the voluntary nature of his plea, we find, in light of all the evidence, that he entered his plea knowingly and voluntarily. We therefore affirm the trial court's judgment.
NOTES
[1]  Former Rule 40(b)(1) and the current Rule 25.2(b)(3) are substantially similar. Because this case was brought under the former, we will refer throughout to Rule 40(b)(1).
[2]  In pertinent part, Rule 40(b)(1) states:

Appeal is perfected in a criminal case by giving timely notice of appeal ... but if the judgment was rendered upon his plea of guilty or nolo contendere pursuant to Article 1.15, Code of Criminal Procedure, and the punishment assessed does not exceed the punishment recommended by the prosecutor and agreed to by the defendant and his attorney, in order to prosecute an appeal for nonjurisdictional defect or error that occurred prior to entry of the plea the notice shall state that the trial court granted permission to appeal or shall specify that those matters were raised by written motion and ruled on before trial.... Id. (emphasis added).
[3]  Because we hold Delatorre has a limited right to appeal as governed by Rule 40(b)(1), we need not reach point of error seven appealing the sufficiency of the evidence to support the judgment.
