I think we very probable need a bit more details here.
Which core are you using?
Which compiler?
With optimizations?
Can you show a compilable sample showing the problem?
Maybe a disassemble listing with the code and a comment how you expect it to be.
With the given info so far: Case entries in C do not jump to the end, you have to have a break. A missing break is a a common mistake.
But in the end: we need more info :smileyhappy: