On 05/17/2010 09:44 AM, Marc Kleine-Budde wrote:
> Wolfgang Grandegger wrote:
>> Hi Marc,
>>
>> On 05/17/2010 12:46 AM, Marc Kleine-Budde wrote:
>>> Hey Wolfgang,
>>>
>>> Marc Kleine-Budde wrote:
>>>>>> The patch series can be viewed as as git tree under:
>>>>>> http://git.pengutronix.de/?p=mkl/berlios-can-utils.git;a=shortlog;h=refs/heads/pu
>>>>> I would prefer to make the struct can_bittiming_const compatible with
>>>>> the one used by the kernel:
>>>>>
>>>>> http://lxr.linux.no/#linux+v2.6.33/drivers/net/can/sja1000/sja1000.c#L75
>>> The common members have now the same names, but there's still the printf_btr
>>> and I add a ref_clock in a later patch.....
>>>
>>>>> I forgot to mention that, sorry. Should not be a big deal, though.
>>>> There're more patches to come. And one of this does exactly this. I just
>>>> have to write a decent commit message for the last patch, then I'll send 
>>>> it.
>>> Here they are...they are based on the other series I posted earlier.
>>>
>>> It's available as a git tree at:
>>> http://git.pengutronix.de/?p=mkl/berlios-can-utils.git;a=shortlog;h=refs/heads/rfc/better-bitrate-calculation
>>
>> Looks good at a first glance and they could go in immediately. We can
>> add fixes later on, if necessary. One requirement of the algorithm is
>> that it *must* reproduce the CIA recommanded values for the SJA1000 for
>> the standard bit-rates. We should not expect that it works for any
> 
> Have a look at patch 5. In it's patch description is a diff of output of
> the original and the improved version. As you can see no changes for the
> sja.

Ah, right.

> The original algorithm find optimal values for the sja (no bitrate error
> and no sample point error). My patch just optimizes the sample point in
> cases where you cannot avoid bitrate errors.

Good. At some point we may want to update the algorithm in the kernel as
well.

>> bitrate, especially with exotic clock frequencies. Those require manual
>> fiddling with the bit-timing parameters, e.g. SJW, which is non-trivial.
> 
> I tend to call them "real live" clock values :)

Yes, that's the real fun.

Wolfgang.
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to