pierremolinaro / acan2515

MCP2515 CAN Controller Driver for Arduino
MIT License
74 stars 29 forks source link

Request: expose error flag register #27

Closed obdevel closed 3 years ago

obdevel commented 3 years ago

It would be very useful to be able to read the chip's error flag register (0x2D ?) This enables one to check for error states such as warning level, error passive, bus off, etc. A value of zero means 'no error' and the definitions of the individual bit values can be found in the datasheet.

It is present in the MCP_CAN library as the getError() method.

pierremolinaro commented 3 years ago

Sorry the delay. I have just add the errorFlagRegister register method, I make a release this evening.

Best regards,

Pierre Molinaro

Le 28 avr. 2021 à 13:31, obdevel @.***> a écrit :

It would be very useful to be able to read the chip's error flag register (0x2D ?) This enables one to check for error states such as warning level, error passive, bus off, etc. A value of zero means 'no error' and the definitions of the individual bit values can be found in the datasheet.

It is present in the MCP_CAN library as the getError() method.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pierremolinaro/acan2515/issues/27, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEWKZVBHW3OFKSQKG4XDTCTTK7WZXANCNFSM43W4NYCA.

obdevel commented 3 years ago

Thanks Pierre.

The register and the individual bits are documented in the device's datasheet, on pages 50-52. It's very useful to be able to detect bus hardware issues.

D


From: Pierre Molinaro @.> Sent: 03 May 2021 14:00 To: pierremolinaro/acan2515 @.> Cc: obdevel @.>; Author @.> Subject: Re: [pierremolinaro/acan2515] Request: expose error flag register (#27)

Sorry the delay. I have just add the errorFlagRegister register method, I make a release this evening.

Best regards,

Pierre Molinaro

Le 28 avr. 2021 à 13:31, obdevel @.***> a écrit :

It would be very useful to be able to read the chip's error flag register (0x2D ?) This enables one to check for error states such as warning level, error passive, bus off, etc. A value of zero means 'no error' and the definitions of the individual bit values can be found in the datasheet.

It is present in the MCP_CAN library as the getError() method.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pierremolinaro/acan2515/issues/27, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEWKZVBHW3OFKSQKG4XDTCTTK7WZXANCNFSM43W4NYCA.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpierremolinaro%2Facan2515%2Fissues%2F27%23issuecomment-831242770&data=04%7C01%7C%7Ccb358bbcc05740cfb84108d90e335cb4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637556436022441776%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=gmW5WsqVflhA8ejvTl1xwoTeG70vhYBZLjcDNd2Y0%2F0%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADKBFH55XP7MFLPTRFKJDZDTL2M5BANCNFSM43W4NYCA&data=04%7C01%7C%7Ccb358bbcc05740cfb84108d90e335cb4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637556436022451734%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=AQOK8Q2XEBKiZ9TxuaahO9a1OCUoydvPg8egwY5k9Qc%3D&reserved=0.

pierremolinaro commented 3 years ago

Yes, I agree. I have duplicated the page 50 in the ACAN2515 doc. I have submitted the new release (2.0.8), the new version should be available soon.

Best Regards,

Pierre

Le 3 mai 2021 à 16:39, obdevel @.***> a écrit :

Thanks Pierre.

The register and the individual bits are documented in the device's datasheet, on pages 50-52. It's very useful to be able to detect bus hardware issues.

D


From: Pierre Molinaro @.> Sent: 03 May 2021 14:00 To: pierremolinaro/acan2515 @.> Cc: obdevel @.>; Author @.> Subject: Re: [pierremolinaro/acan2515] Request: expose error flag register (#27)

Sorry the delay. I have just add the errorFlagRegister register method, I make a release this evening.

Best regards,

Pierre Molinaro

Le 28 avr. 2021 à 13:31, obdevel @.***> a écrit :

It would be very useful to be able to read the chip's error flag register (0x2D ?) This enables one to check for error states such as warning level, error passive, bus off, etc. A value of zero means 'no error' and the definitions of the individual bit values can be found in the datasheet.

It is present in the MCP_CAN library as the getError() method.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pierremolinaro/acan2515/issues/27, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEWKZVBHW3OFKSQKG4XDTCTTK7WZXANCNFSM43W4NYCA.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpierremolinaro%2Facan2515%2Fissues%2F27%23issuecomment-831242770&data=04%7C01%7C%7Ccb358bbcc05740cfb84108d90e335cb4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637556436022441776%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=gmW5WsqVflhA8ejvTl1xwoTeG70vhYBZLjcDNd2Y0%2F0%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADKBFH55XP7MFLPTRFKJDZDTL2M5BANCNFSM43W4NYCA&data=04%7C01%7C%7Ccb358bbcc05740cfb84108d90e335cb4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637556436022451734%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=AQOK8Q2XEBKiZ9TxuaahO9a1OCUoydvPg8egwY5k9Qc%3D&reserved=0. — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pierremolinaro/acan2515/issues/27#issuecomment-831303695, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEWKZVBJT53IAQHMGQOIOADTL2YTNANCNFSM43W4NYCA.