Hi all,
First time using MSCAN, and as it was to be expected I have some problems.
Trying to get a 50Kbps rate (low enough for now to not worry much about possible clock accuracy issues), using the following parameters:
CAN Driver: MCZ33902 (has a 40Kbps minimum rate)
DZ32 MCU bus clock: 16MHz
CAN prescaler: 32 (gives CAN clock 500KHz)
Prop Seg: 3 time quanta
Seg1: 3 time quanta
Seg2: 3 time quanta
Total bit time quanta: 10
RJW: 3
CANBTR0_VALUE: 158 [$009E]
CANBTR1_VALUE: 37 [$0025]
On the other end I have a CAN232 (www.can232.com) dongle set at 50Kbps, used to send a packet and try to see it being received on the MCU side, but no luck.
I may have some serious misconceptions about how the bit time quanta are supposed to be divided. For example, it may be possible to get the same CAN bps rate (say 50Kbps) using various bit quanta with different clocks. Will a 50Kbps rate work between two systems if one of them uses 10 time quanta per bit and the other achieves the same bps rate using, say, 20 time quanta?
I've read the relevant parts of AN1798, bosch_cia99-can-bit-timing.pdf, and the official Bosch specification, but still can't be sure if I have it correctly.
Also, I read in some application note that one should not use the internal oscillator FLL/PLL for CAN clock, but since it was too vague, I believe this is related to speeds higher than 125Kbps. I'm way lower than that, so I hope this would not be a problem, as the clock tolerance is way below 1.58% seen in some of these references. If my settings seem correct to you, then the last thing to try is to use an external clock.
TIA