I've attached a project targeted at exploring how to adjust the PSoC5 IMO and ILO clocks by modifying the trim value at run-time. The original goal with to provide a replacement for the Cypress component ILO_trim and the now depreciated (retired) IMO_trim.
It was intended to be a learning exercise and boy it WAS! Adjusting the IMO clock more than just a few trim values can result in CPU misclocking and UART baudrate clock errors without the proper precautions. This exercise helped me to appreciate all the care Cypress put in defining the clock control registers.
The project allows the user to select the base internal IMO frequency and it allows the user to adjust the IMO clocks in real-time from 1MHz to 80MHz.
The project will also allow the user to trim the ILO clock to a "more" accurate 1KHz.
I hope this aids in your understanding of the low-level control of the IMO and ILO clocks and the related subsystems.
Thanks for the effort you have taken in developing the project and sharing it with the community. We appreciate this.