-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arduino MKR Zero & MKR Can Shield -> SREG not defined, cli(), sei() #4
Comments
I still like Teensy more... The changes should be OK with quick look. I should add defines for NMEA2000_mcp.cpp - others has also used mcp_can on different environment. Do you use mcp_can library from my git? I am not sure of status from other sources and mine can also handle both transmit and receive with interrupt. You could also try to leave int pin undefined, so it should use just polling, which is enough on the tests. I have not heard others using MKR. |
I have to use the MKR Zero, because I do not built the electronics from scratch, I just add NMEA2000 functionality to an already existing project... |
Is this issue solved? I want to use the Arduino MKR WIFI 1010 and the MKR CAN shield. Or can i use the teensy 3.6. I read that the Teensy 3.6 has CAN onb board. Is this with Transceiver and Controller? |
Should be. I have modified NMEA2000_mcp to use SREG only with Mega and Uno. All Teensy 3.2 and up has internal can controller and requires tranceiver ship. I have used MCP2562 without any problem. With ISO1050 tranceiver you can make isolated system. |
As a feedback to @ttlappalainen, and to those that find this tread in the future: I have 3 ds18b20 (one-wire Temperatur sensor) connected on a one-wire bus, then senses temperatures on my old VP 2003t engine. For testting purpose, the alarm is set to 26 C, in case you wondered..;) I can highly recommend ttlappalainen's excellent document "Connecting_hardware_to_NMEA2000.pdf", specially the troubleshooting section : A little more info here: https://sillydiy.blogspot.com/2022/01/measuring-boat-engine-temperature-wih.html |
Cannot find a trace of "Connecting_hardware_to_NMEA2000.pdf" anywhere. Where did you see this? |
It is old document and moved as part of NMEA2000 library document: https://ttlappalainen.github.io/NMEA2000/page_h_w_set_up.html |
Thank you.
On 2024-07-22 20:25, Timo Lappalainen wrote:
It is old document and moved as part of NMEA2000 library document:
https://ttlappalainen.github.io/NMEA2000/page_h_w_set_up.html [1]
--
Reply to this email directly, view it on GitHub [2], or unsubscribe
[3].
You are receiving this because you commented.Message ID:
***@***.***>
Links:
------
[1]
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fttlappalainen.github.io%2fNMEA2000%2fpage_h_w_set_up.html&c=E,1,_99QL2EMbOHFlHE8O8KQa65x5Wp02U4Yu9FrIRjWC6yatu28S17DtoG8UZV-iK1-papfqaoYsj2aKEQvGv629lz_B2refQ2J22drwBPS8pFNy1c,&typo=1
[2]
#4 (comment)
[3]
https://github.com/notifications/unsubscribe-auth/AP3VP5DG24B57ZXL3Q3WMRLZNW5ITAVCNFSM6AAAAABLJIXLCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBUGEZDQNZWGI
|
I use the Arduino MKR Zero (SAMD21 Cortex-M0+ based) and the MKR Can shield (MCP2515 based) with your librarys.
The hardware works, I can read NMEA2000 packets interpreted as standard can extended packets using a can library.
I used the Actisense Listener example provided with the library, and only put these lines before including anything for configuring the MCP2515 correctly:
#define USE_N2K_CAN 1
#define N2k_SPI_CS_PIN 3
#define N2k_CAN_INT_PIN 7
#define USE_MCP_CAN_CLOCK_SET 16
The compiler was not able to compile NMEA2000_mcp.cpp for the ARM, because it has no SREG, so I commented it out. I also had to replace cli() and sei() with noInterrupts() and interrupts().
Then I was able to compile it, but I did not receive any messages. I think the changes I made are not complete.
Has anyone tried it with the MKR Zero and CAN Shield yet? I think this would be the perfect hardware.
The text was updated successfully, but these errors were encountered: