Please allow me to add a comment to your explanation. In the context of the posted sentences, most people would use adjective such as “incorrectly” or “inaccurately” rather than “wrongly”.
If someone is accused and prosecuted of a crime he never committed, then he is said to be wrongly/ wrongfully prosecuted,
0In American English, 01b00wrong02b00 is accepted as an adverb and is also commonly used that way. So the most common correct version of your sentence on this side of the pond would be this: "01i00I spelled grammar wrong02i00." 050010id1