I'm confused on the register protection function of MPC5775K. I can't find the defines of REG_PORT_SLBRn and REG_PORT_GCR in the file of mpc5775k.h, and register-protection operations in the examples of MPC5775K. So it is the question: How can i write data to the register-protection registers? and thank you for reply!
Register protection mechanism is described in reference manual Chapter 77 Register Protection (REG_PROT).
It also depends if you wan to use soft lock or hard lock.
All necessary details are in reference manual + as example you can check MPC5748G main.c file. The mechanism is same on all MPC57xx devices.