I'm setting up my PIC oscillator frequency and I'm using a PIC24HJ128GP202. From what I've seen in the datasheet, two of my total options were to use a crystal or a internal oscillator (FRC) which would go through the PLL and scale my frequency of operation up to 80MHz.
I decided to use a 10MHz external crystal. To reach 40 MIPS I should configure correclty the PLL parameters N1, N2 and M. It all seems to be fine except that these last parameters are configurable by software. I was used to PIC's like PIC18f4550 where these oscillator settings were configurable through the configuration bits. So whenever I program the device, it would have those settings always after reset.
In this case (PIC24HJ128GP202) I can only configure what kind of oscillator I will use in the configuration bits (HS with PLL). PLL is only configurable by software. So, since the PLL default values will get my frequency out of the bounds specified by the datasheet, how can I configure the PLL by software if the software requires a correct oscillator frequency of operation? Is it the case of using IESO (start-up with internal oscillator)? Any other way around this problem?