Hello,
I am unable to identify why the breakpoint is not being hit.
Well, it is because your SW does not reach address where you have the breakpoint. Or your breakpoint is not set correectly. For example BP is set for writes, and you only read from such address.
I have tried changing the switch's position, which didn’t yield any response. Could someone advise on potential reasons for a breakpoint not being hit in such a scenario?
No idea what is "switch", nor what kind of debugger you are using.
Simply switch the code view to assembly and step debug it, to see why you BP is not called. If the BP is in interrupt, it might be issue of that.
Is your code even working with address where the BP is set?
Best regards,
Peter