13.17.10 Slew Rate Control for Clock Switching

Note:
  • The system unlock sequence must be done before this register can be written.
  • Updates to this register do not take effect until OSCCON[OSWEN] is set.
Name: SLEWCON
Offset: 0x160
Reset: 0x00000000

Bit 3130292827262524 
     SLW_DELAY[3:0] 
Access R/WR/WR/WR/W 
Reset cccc 
Bit 2322212019181716 
     SYS_DIV[3:0] 
Access R/WR/WR/WR/W 
Reset cccc 
Bit 15141312111098 
      SLW_DIV[2:0] 
Access R/WR/WR/W 
Reset ccc 
Bit 76543210 
      SLW_UPSLW_DNSLW_BUSY 
Access R/WR/WR/W 
Reset ccc 

Bits 27:24 – SLW_DELAY[3:0] Number of clocks generated at each slew step for a clock switch

Note: The reset value of this register field is defined by the input cfg_slewcon_sel[].
ValueDescription
00001 clock will be generated at each slew step
00012 clocks will be generated at each slew step
......
111116 clocks will be generated at each slew step

Bits 19:16 – SYS_DIV[3:0] PBx Peripheral Clock Divisor Control value

ValueDescription
0000Divide by 1 – SYS_CLK_OUT same frequency as SYS_CLK source - Default
0001Divide by 2 – SYS_CLK_OUT is 1/2 of SYS_CLK source
0010Divide by 3 – SYS_CLK_OUT is 1/3 of SYS_CLK source
......
1111Divide by 16 – SYS_CLK_OUT is 1/16 of SYS_CLK source

Bits 10:8 – SLW_DIV[2:0] Divisor steps used when doing slewed clock switches

Note: Each Divisor step lasts four clocks
ValueDescription
000No divisor is used
001Divide by 2 (21), then no divisor
010Divide by 4 (22), then by 2, then no divisor
011Divide by 8 (23), then by 4, then by 2, then no divisor
100Divide by 16 (24), then by 8, then by 4, then by 2, then no divisor
......
111Divide by 128 (27), then by 64, then by 32, then by 16, then by 8, then by 4, then by 2, then no divisor

Bit 2 – SLW_UP Clock slew enable for switching up to faster clocks

ValueDescription
0Clock Slewing is disabled
1Clock Slewing is enabled on a clock switch OR exit from Sleep

Bit 1 – SLW_DN Clock slew enable for switching down to slower clocks

ValueDescription
0Clock Slewing is disabled
1Clock Slewing is enabled on a clock switch

Bit 0 – SLW_BUSY Clock Switch Slewing Active Status Bit – Read-Only

ValueDescription
0Clock Switch has reached its final value
1Clock frequency is being actively Slewed