>> In CAN systems, the bit period is divided into several sections, and each section is a whole number of Tq long.
Is each section programmed by CAN Driver?
>> The point within the bit time where the data is sampled can be adjusted by adjusting the number of Tq times before and after the sampling.
Are the adjustment values fetched from CAN Controller registers?
>> I've not seen that done with LIN, but the same principles apply.
Attached is section 2.4 from Renesas RH850 LIN Controller Application Note. One of the parameters in section 2.4 is Number of segments (quanta). Are these segments determined by LIN controller? LIN driver doesn't need to program time quanta whole number(s) ?
A lot of what I know about Tq in CAN drivers has come from Microchip. Here is one of their data sheets:-
https://ww1.microchip.com/downloads/en/DeviceDoc/70353C.pdf
Section 21.9 of that explains bit timing. The length of each section is defined in the CAN configuration registers.
I think that you would always have to have a whole number of Tq or segments in one bit. I can't see how it could work with fractional numbers.
On the CAN microcontroller that I have used, there is a PLL that allows a wide range of frequency options, so the LIN or CAN baud rate does not have to be an integral fraction of the oscillator speed. However the CAN and LIN Baud rates do have to be obtained by dividing the PLL output frequency by a whole number. With modern processors, and for the slow speeds that LIN runs at, the divide ratios needed are large numbers, and that gives a lot of flexibility.
For instance, if the processor is running at 50 MHz, and the LIN is at 19200 Baud, the divide needed is 2604.1666 so it's not possible to have exactly the right divide ratio. However, dividing by 2600 will only be 0.16% in error, which is fine for LIN.
With lower frequency clock speed, and less flexibility in the divide ratio, getting the correct speed was more problem with older processors. For instance, if the processor is running at 8 MHz, and can only divide by powers of 2, the correct divide ratio would be 416.6666. If the only ratios available were 128, 256, 512 1024 etc then none of those would be close enough to work and different clock speed would have to be chosen.