The PBP HPWM command only gives something like 32Khz max PWM frequency. Although that is fine for a few things, writing directly to the registers allows frequencies to 416K and above.

Your chip's datasheet is your friend here. It explains the PR2 value vs. max resolution. For example: In the PIC18F8722 datasheet, look up table 17-3.