An electronic circuit, comprising: a protected module having functional registers; a master module configured to write data to and read data from the functional registers; and a protection module configured to prevent unintended write operations by the master module to the functional registers, wherein the protection module comprises: soft lock bits, SLBs, corresponding to the functional registers, wherein, if an SLB is set, then the corresponding functional register is locked; and control logic configured to provide: a page select, PS, control parameter that indicates whether access by the master module is to the functional registers or to the SLBs; and a mode select, MS, control parameter that indicates whether access by the master module to the functional registers is in a normal access mode in which each written-to functional register is left unlocked or an auto-lock access mode in which each written-to functional register is locked by setting the corresponding SLB; characterized in that the control logic is further configured to provide an automatic page switching enable, ASE, control parameter that indicates whether the PS control parameter is automatically toggled to the functional registers after a write operation to an SLB and to the SLBs after a write operation to a functional register. a protected module having functional registers; a master module configured to write data to and read data from the functional registers; and a protection module configured to prevent unintended write operations by the master module to the functional registers, wherein the protection module comprises: soft lock bits, SLBs, corresponding to the functional registers, wherein, if an SLB is set, then the corresponding functional register is locked; and control logic configured to provide: a page select, PS, control parameter that indicates whether access by the master module is to the functional registers or to the SLBs; and a mode select, MS, control parameter that indicates whether access by the master module to the functional registers is in a normal access mode in which each written-to functional register is left unlocked or an auto-lock access mode in which each written-to functional register is locked by setting the corresponding SLB; characterized in that the control logic is further configured to provide an automatic page switching enable, ASE, control parameter that indicates whether the PS control parameter is automatically toggled to the functional registers after a write operation to an SLB and to the SLBs after a write operation to a functional register. soft lock bits, SLBs, corresponding to the functional registers, wherein, if an SLB is set, then the corresponding functional register is locked; and control logic configured to provide: a page select, PS, control parameter that indicates whether access by the master module is to the functional registers or to the SLBs; and a mode select, MS, control parameter that indicates whether access by the master module to the functional registers is in a normal access mode in which each written-to functional register is left unlocked or an auto-lock access mode in which each written-to functional register is locked by setting the corresponding SLB; characterized in that the control logic is further configured to provide an automatic page switching enable, ASE, control parameter that indicates whether the PS control parameter is automatically toggled to the functional registers after a write operation to an SLB and to the SLBs after a write operation to a functional register. a page select, PS, control parameter that indicates whether access by the master module is to the functional registers or to the SLBs; and a mode select, MS, control parameter that indicates whether access by the master module to the functional registers is in a normal access mode in which each written-to functional register is left unlocked or an auto-lock access mode in which each written-to functional register is locked by setting the corresponding SLB; characterized in that the control logic is further configured to provide an automatic page switching enable, ASE, control parameter that indicates whether the PS control parameter is automatically toggled to the functional registers after a write operation to an SLB and to the SLBs after a write operation to a functional register.