Hi, Jashan,
For example, if the Bus clcok is 24MHz, the prescaler is 2, the MSCAN the time quanta 0.08333uS. If the required baudrate is 500KBPS, the sum of (SYNC_SEG+PROP_SEG + PHASE_SEG1+PHASE_SEG2) should be 12MHz/0.5MHz=24.
You can use the following parameters:
SYNC_SEG=1
PROP_SEG + PHASE_SEG1=15
PHASE_SEG2=8
This is register setting for 500Kbps based on 24MHz bus clock from FLL and 12M Time quanta clock frequency.
MSCAN_CANBTR0=0x01; //prescaler is 2, Synchronization Jump Width=1 Tq
MSCAN_CANBTR1=0x7E;
If you use external 8MHz clock, you can use the external clock to drive the MSCAN directly, but you need reconfigure the above two register.
BTW, if you use PE or SDK, after you input required baudrate, the PE/SDK can set up the register automatically.
Hope it can help you.