The Canadian Charter of Rights and Freedoms specifically addresses the rights of individuals who have been detained by police or charged with a crime. If the police detain or arrest you, then you have a right to be told the reason why. The charter also states that everyone "has a right to be secure against unreasonable search or seizure."
If at any point before, during or after an arrest your charter rights are violated, then the charge against you may be challenged on those grounds. With these matters in mind, let's consider a number of other rights that could be violated by police or prosecutors.
If you have been arrested or detained, then you have a right to retain legal counsel without delay. You also have a right to be informed of your right to retain legal counsel.
If a charge has been brought against you, then you have a right "to be informed without reasonable delay of the specific offence," and your court case should proceed within a reasonable timeframe. You also have a right not to provide testimony that would incriminate you.
The police must have a valid reason to detain or arrest you. If the reason for your detainment is not valid, then any evidence the police may have collected while you were detained could be kept out of court, and the charge could be dropped.
You are also presumed innocent under the law
unless or until guilt is proven "in a fair and public hearing by an independent and impartial tribunal" -- a jury, in other words.
If you have concerns about whether your charter rights have been violated, then you should speak with a criminal defence lawyer as soon as possible. Depending on your specific situation, it may be possible to convince the Crown to drop the charge. In any case, a defence lawyer can explain your options for minimizing the negative consequences
of an arrest.