* MCAN Registers Discrepancy
@ 2017-06-28 21:49 Franklin S Cooper Jr
2017-06-29 14:52 ` Mario Hüttel
2017-06-29 17:38 ` Oliver Hartkopp
0 siblings, 2 replies; 5+ messages in thread
From: Franklin S Cooper Jr @ 2017-06-28 21:49 UTC (permalink / raw)
To: linux-can, wg, mkl, b29396, socketcan
Hi,
When looking at the latest versions of the MCAN user manual it seems
that there is a discrepancy between the various BTR_XX_MASK and
BTR_XX_SHIFT values. For example BTR_TSEG2_MASK is set to 0xF and
BTR_TSEG2_SHIFT is 4. However, based on page 21 of the latest version of
the MCAN User Manual NTSEG2 starts at bit 0. Therefore, it should have a
shift value of 0. Also it is a 7 bit field so its mask should be 0x7F. I
see similar issues with FBTR_XXX_MASK values.
So the original driver mentioned it was based on rev version 3.1.0 of
the User Manual while the latest version publicly available is 3.2.12.
Since I don't see any current users of this driver in upstream I am
unsure if this is just a bug in the code or if the current values are
correct for older versions of the IP.
Does anyone have a copy of this older document available that they can
share? Or at the very least verify that the current values were correct
in older revisions of the MCAN IP? I need to make updates to the drivers
but I want to avoid breaking things for other people.
Latest version of the MCAN User Manual can be found at:
http://www.bosch-semiconductors.de/media/automotive_electronics/pdf_2/ipmodules_3/m_can_m_ttcan_1/mcan_users_manual_v3212.pdf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MCAN Registers Discrepancy
2017-06-28 21:49 MCAN Registers Discrepancy Franklin S Cooper Jr
@ 2017-06-29 14:52 ` Mario Hüttel
2017-06-29 15:13 ` Franklin S Cooper Jr
2017-06-29 17:38 ` Oliver Hartkopp
1 sibling, 1 reply; 5+ messages in thread
From: Mario Hüttel @ 2017-06-29 14:52 UTC (permalink / raw)
To: Franklin S Cooper Jr, linux-can, wg, mkl, b29396, socketcan
[-- Attachment #1.1: Type: text/plain, Size: 2096 bytes --]
Hello,
you are right. There are/were some incosistencies in the values.
However, the driver used them correctly. The driver version you
talk about is not entirely compatible with the user manual you provided.
I wrote some patches back in April which add support for the newer M_CAN
versions up to 3.2.X:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/net/can/m_can
These should work as intended.
Before, the driver could only handle IP versions 3.0.X.
Mario
On 06/28/2017 11:49 PM, Franklin S Cooper Jr wrote:
> Hi,
>
> When looking at the latest versions of the MCAN user manual it seems
> that there is a discrepancy between the various BTR_XX_MASK and
> BTR_XX_SHIFT values. For example BTR_TSEG2_MASK is set to 0xF and
> BTR_TSEG2_SHIFT is 4. However, based on page 21 of the latest version of
> the MCAN User Manual NTSEG2 starts at bit 0. Therefore, it should have a
> shift value of 0. Also it is a 7 bit field so its mask should be 0x7F. I
> see similar issues with FBTR_XXX_MASK values.
>
> So the original driver mentioned it was based on rev version 3.1.0 of
> the User Manual while the latest version publicly available is 3.2.12.
> Since I don't see any current users of this driver in upstream I am
> unsure if this is just a bug in the code or if the current values are
> correct for older versions of the IP.
>
> Does anyone have a copy of this older document available that they can
> share? Or at the very least verify that the current values were correct
> in older revisions of the MCAN IP? I need to make updates to the drivers
> but I want to avoid breaking things for other people.
>
> Latest version of the MCAN User Manual can be found at:
> http://www.bosch-semiconductors.de/media/automotive_electronics/pdf_2/ipmodules_3/m_can_m_ttcan_1/mcan_users_manual_v3212.pdf
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MCAN Registers Discrepancy
2017-06-29 14:52 ` Mario Hüttel
@ 2017-06-29 15:13 ` Franklin S Cooper Jr
0 siblings, 0 replies; 5+ messages in thread
From: Franklin S Cooper Jr @ 2017-06-29 15:13 UTC (permalink / raw)
To: Mario Hüttel, linux-can, wg, mkl, b29396, socketcan
Hi Mario,
On 06/29/2017 09:52 AM, Mario Hüttel wrote:
> Hello,
>
> you are right. There are/were some incosistencies in the values.
>
> However, the driver used them correctly. The driver version you
>
> talk about is not entirely compatible with the user manual you provided.
>
>
> I wrote some patches back in April which add support for the newer M_CAN
>
> versions up to 3.2.X:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/net/can/m_can
>
> These should work as intended.
>
> Before, the driver could only handle IP versions 3.0.X.
It was my mistake. Looks like the branch I was working off of wasn't
updated for a bit. Your patches contain exactly what I found was needed.
>
>
> Mario
>
>
>
> On 06/28/2017 11:49 PM, Franklin S Cooper Jr wrote:
>> Hi,
>>
>> When looking at the latest versions of the MCAN user manual it seems
>> that there is a discrepancy between the various BTR_XX_MASK and
>> BTR_XX_SHIFT values. For example BTR_TSEG2_MASK is set to 0xF and
>> BTR_TSEG2_SHIFT is 4. However, based on page 21 of the latest version of
>> the MCAN User Manual NTSEG2 starts at bit 0. Therefore, it should have a
>> shift value of 0. Also it is a 7 bit field so its mask should be 0x7F. I
>> see similar issues with FBTR_XXX_MASK values.
>>
>> So the original driver mentioned it was based on rev version 3.1.0 of
>> the User Manual while the latest version publicly available is 3.2.12.
>> Since I don't see any current users of this driver in upstream I am
>> unsure if this is just a bug in the code or if the current values are
>> correct for older versions of the IP.
>>
>> Does anyone have a copy of this older document available that they can
>> share? Or at the very least verify that the current values were correct
>> in older revisions of the MCAN IP? I need to make updates to the drivers
>> but I want to avoid breaking things for other people.
>>
>> Latest version of the MCAN User Manual can be found at:
>> http://www.bosch-semiconductors.de/media/automotive_electronics/pdf_2/ipmodules_3/m_can_m_ttcan_1/mcan_users_manual_v3212.pdf
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-can" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MCAN Registers Discrepancy
2017-06-28 21:49 MCAN Registers Discrepancy Franklin S Cooper Jr
2017-06-29 14:52 ` Mario Hüttel
@ 2017-06-29 17:38 ` Oliver Hartkopp
2017-06-29 18:19 ` Franklin S Cooper Jr
1 sibling, 1 reply; 5+ messages in thread
From: Oliver Hartkopp @ 2017-06-29 17:38 UTC (permalink / raw)
To: Franklin S Cooper Jr; +Cc: linux-can, Huettel Mario (AE/PJ-SCI1)
Hi Franklin,
I added Mario in CC as he provided the latest updates to the M_CAN
driver and the multi IP revision support.
As you are not the first one asking for the 'older' M_CAN IP revision
user manuals I uploaded my formerly downloaded manuals here:
https://github.com/hartkopp/M_CAN-User-Manual-History
Best regards,
Oliver
On 06/28/2017 11:49 PM, Franklin S Cooper Jr wrote:
> When looking at the latest versions of the MCAN user manual it seems
> that there is a discrepancy between the various BTR_XX_MASK and
> BTR_XX_SHIFT values. For example BTR_TSEG2_MASK is set to 0xF and
> BTR_TSEG2_SHIFT is 4. However, based on page 21 of the latest version of
> the MCAN User Manual NTSEG2 starts at bit 0. Therefore, it should have a
> shift value of 0. Also it is a 7 bit field so its mask should be 0x7F. I
> see similar issues with FBTR_XXX_MASK values.
>
> So the original driver mentioned it was based on rev version 3.1.0 of
> the User Manual while the latest version publicly available is 3.2.12.
> Since I don't see any current users of this driver in upstream I am
> unsure if this is just a bug in the code or if the current values are
> correct for older versions of the IP.
>
> Does anyone have a copy of this older document available that they can
> share? Or at the very least verify that the current values were correct
> in older revisions of the MCAN IP? I need to make updates to the drivers
> but I want to avoid breaking things for other people.
>
> Latest version of the MCAN User Manual can be found at:
> http://www.bosch-semiconductors.de/media/automotive_electronics/pdf_2/ipmodules_3/m_can_m_ttcan_1/mcan_users_manual_v3212.pdf
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MCAN Registers Discrepancy
2017-06-29 17:38 ` Oliver Hartkopp
@ 2017-06-29 18:19 ` Franklin S Cooper Jr
0 siblings, 0 replies; 5+ messages in thread
From: Franklin S Cooper Jr @ 2017-06-29 18:19 UTC (permalink / raw)
To: Oliver Hartkopp; +Cc: linux-can, Huettel Mario (AE/PJ-SCI1)
Hi Oliver,
On 06/29/2017 12:38 PM, Oliver Hartkopp wrote:
> Hi Franklin,
>
> I added Mario in CC as he provided the latest updates to the M_CAN
> driver and the multi IP revision support.
>
> As you are not the first one asking for the 'older' M_CAN IP revision
> user manuals I uploaded my formerly downloaded manuals here:
>
> https://github.com/hartkopp/M_CAN-User-Manual-History
It seems I missed Mario's changes since he fixed the problem I
mentioned. But thanks for sharing these documents. It helps alot.
>
> Best regards,
> Oliver
>
> On 06/28/2017 11:49 PM, Franklin S Cooper Jr wrote:
>> When looking at the latest versions of the MCAN user manual it seems
>> that there is a discrepancy between the various BTR_XX_MASK and
>> BTR_XX_SHIFT values. For example BTR_TSEG2_MASK is set to 0xF and
>> BTR_TSEG2_SHIFT is 4. However, based on page 21 of the latest version of
>> the MCAN User Manual NTSEG2 starts at bit 0. Therefore, it should have a
>> shift value of 0. Also it is a 7 bit field so its mask should be 0x7F. I
>> see similar issues with FBTR_XXX_MASK values.
>>
>> So the original driver mentioned it was based on rev version 3.1.0 of
>> the User Manual while the latest version publicly available is 3.2.12.
>> Since I don't see any current users of this driver in upstream I am
>> unsure if this is just a bug in the code or if the current values are
>> correct for older versions of the IP.
>>
>> Does anyone have a copy of this older document available that they can
>> share? Or at the very least verify that the current values were correct
>> in older revisions of the MCAN IP? I need to make updates to the drivers
>> but I want to avoid breaking things for other people.
>>
>> Latest version of the MCAN User Manual can be found at:
>> http://www.bosch-semiconductors.de/media/automotive_electronics/pdf_2/ipmodules_3/m_can_m_ttcan_1/mcan_users_manual_v3212.pdf
>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-06-29 18:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-28 21:49 MCAN Registers Discrepancy Franklin S Cooper Jr
2017-06-29 14:52 ` Mario Hüttel
2017-06-29 15:13 ` Franklin S Cooper Jr
2017-06-29 17:38 ` Oliver Hartkopp
2017-06-29 18:19 ` Franklin S Cooper Jr
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.