Clock and prescaler configuration problem in Simulink master block for MCC generated code
I am facing the following problem:
With the code configurator I am setting up some interfaces to be used in Matlab with the aid of C function calls.
The CAN interface is dependent on the oscillator configuration. In Simulink, when I activate the PLL to set the desired MIPS, the prescaler, feedback and postscaler are automatically configured.
When I am using the same settings in MPLAB to generate the code for the CAN interface via the MCC, it warns that these settings are not okay for the CAN interface as I want to set it up.
The reason is that the prescaler (in my case with 8MHz xtal) is set to weird values like 1.1429MHz instead of by example 2MHz or 4 MHz.
How can I make sure I can set the prescaler, feedback and postscaler properly in the simulink master block, without altering the code after generating the code from matlab? (if not possible, consider this as a feature request)