I am working on a project in which I am using USB and CAN together. I am sending data to the PIC32MX795F512L on the Ethernet Starter Kit from the PC and sending data out through the CAN Bus.
I can get both modules to work individually but when placing the two together in the same program I face certain problems. I narrowed down the problem to the oscillator configuration. When the two programs are combined and I work with the Primary Oscillator (8 Mhz) with PLL the USB works and the CAN doesn't. When I use the internal FRC oscillator the CAN module works and the usb doesn't.
What I have decided to do is work with the Primary Oscillator with PLL and modify my CAN configuration to work with that system clock speed.
I need help with calculating my system clock speed. Here are the relevant configuration bits.