-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A new low price board supporting CANnectvity Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
- Loading branch information
1 parent
42bbcd1
commit a7246a0
Showing
3 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# The three lines below are needed to reduce ROM usage | ||
CONFIG_LTO=y | ||
CONFIG_SIZE_OPTIMIZATIONS=y | ||
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y | ||
|
||
CONFIG_USB_DEVICE_GS_USB_TIMESTAMP=y | ||
CONFIG_USB_DEVICE_GS_USB_TERMINATION=n | ||
CONFIG_USB_DEVICE_GS_USB_MAX_CHANNELS=1 | ||
CONFIG_USB_DEVICE_GS_USB_TIMESTAMP_SOF=y | ||
CONFIG_USB_DEVICE_GS_USB_IDENTIFICATION=y | ||
|
||
CONFIG_LOG=y | ||
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y | ||
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y | ||
CONFIG_USB_DEVICE_GS_USB_LOG_LEVEL_DBG=n | ||
CONFIG_CANNECTIVITY_LOG_LEVEL_DBG=n | ||
|
||
# Use candleLight_fw VID:PID: | ||
CONFIG_CANNECTIVITY_USB_VID=0x1d50 | ||
CONFIG_CANNECTIVITY_USB_PID=0x606f |
42 changes: 42 additions & 0 deletions
42
app/boards/makerbase/mks_canable_v20/mks_canable_v20.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (c) 2024 Alexander Kozhinov <ak.alexander.kozhinov@gmail.com> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/gpio/gpio.h> | ||
|
||
/ { | ||
cannectivity: cannectivity { | ||
compatible = "cannectivity"; | ||
timestamp-counter = <&counters2>; | ||
|
||
channel0 { | ||
compatible = "cannectivity-channel"; | ||
can-controller = <&fdcan1>; | ||
state-gpios = <&gpioa 15 GPIO_ACTIVE_LOW>; /* blue led */ | ||
activity-gpios = <&gpioa 0 GPIO_ACTIVE_LOW>; /* green led */ | ||
}; | ||
}; | ||
}; | ||
|
||
&zephyr_udc0 { | ||
gs_usb0: gs_usb0 { | ||
compatible = "gs_usb"; | ||
}; | ||
}; | ||
|
||
&timers2 { | ||
/* Timer with 1us tick used for CAN timestamp */ | ||
st,prescaler = <159>; | ||
counters2: counter { | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
&fdcan1 { | ||
reg = <0x40006400 0x400>, <0x4000a400 0x450>; | ||
reg-names = "m_can", "message_ram"; | ||
bosch,mram-cfg = <0x0 28 8 3 3 0 3 3>; | ||
status = "okay"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters