Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions app/boards/robin_e3.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
CONFIG_CORTEX_M_SYSTICK=y

CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
CONFIG_USB_DEVICE_VID=0x1209
CONFIG_USB_DEVICE_PID=0x0AF0
CONFIG_USB_DEVICE_PRODUCT="OpenAstroFirmware"
CONFIG_USB_DEVICE_MANUFACTURER="OpenAstroTech"

CONFIG_USB_CDC_ACM=y
CONFIG_USB_CDC_ACM_RINGBUF_SIZE=512

CONFIG_USB_COMPOSITE_DEVICE=y

# CONFIG_USB_DEVICE_LOG_LEVEL_INF=y
# CONFIG_USB_DRIVER_LOG_LEVEL_INF=y
CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y
115 changes: 115 additions & 0 deletions app/boards/robin_e3.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
/ {
chosen {
// Console and control interfaces
zephyr,console = &usart3;
oaf,uart-control = &cdc_acm_uart0;

// OpenAstroFirmware specific device mappings
oaf,ra-stepper-step = &ra_step;
oaf,ra-stepper-dir = &ra_dir;
oaf,ra-stepper-en = &ra_en;
oaf,dec-stepper-step = &dec_step;
oaf,dec-stepper-dir = &dec_dir;
oaf,dec-stepper-en = &dec_en;
oaf,alt-stepper-step = &alt_step;
oaf,alt-stepper-dir = &alt_dir;
oaf,alt-stepper-en = &alt_en;
oaf,az-stepper-step = &az_step;
oaf,az-stepper-dir = &az_dir;
oaf,az-stepper-en = &az_en;
oaf,focus-stepper-step = &focus_step;
oaf,focus-stepper-dir = &focus_dir;
oaf,focus-stepper-en = &focus_en;

// Sensor mappings
oaf,ra-home-sensor = &ra_homing;
oaf,dec-home-sensor = &dec_homing;
oaf,ra-endstop-east = &ra_endstop_east;
oaf,dec-endstop-up = &dec_endstop_up;


// Communication interfaces
oaf,gps-uart = &usart1;
oaf,external-i2c = &i2c1;

// Status LED
oaf,status-led = &status_led;
};

/* Mount Control Configuration */
mount_controller {
compatible = "oaf,mount-controller";

/* RA Axis Configuration */
ra-axis {
step-gpio = <&ra_step>;
dir-gpio = <&ra_dir>;
enable-gpio = <&ra_en>;
diag-gpio = <&ra_diag>;
home-sensor = <&ra_homing>;
endstop-east = <&ra_endstop_east>;

steps-per-revolution = <3200>;
gear-ratio = <144>;
max-speed = <1000>;
acceleration = <500>;
};

/* DEC Axis Configuration */
dec-axis {
step-gpio = <&dec_step>;
dir-gpio = <&dec_dir>;
enable-gpio = <&dec_en>;
diag-gpio = <&dec_diag>;
home-sensor = <&dec_homing>;
endstop-up = <&dec_endstop_up>;

steps-per-revolution = <3200>;
gear-ratio = <54>;
max-speed = <1000>;
acceleration = <500>;
};

/* Focus/Alt Configuration */
focus-axis {
step-gpio = <&focus_step>;
dir-gpio = <&focus_dir>;
enable-gpio = <&focus_en>;
diag-gpio = <&focus_diag>;

steps-per-revolution = <3200>;
max-speed = <500>;
acceleration = <250>;
};

status = "okay";
};

};

// Configuration for the CDC ACM UART
&zephyr_udc0 {
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
};

// GPS UART configuration
&usart1 {
current-speed = <9600>;
status = "okay";
};

// Additional ADC channel for LCD keypad
&adc1 {
#address-cells = <1>;
#size-cells = <0>;

channel@10 {
reg = <10>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <12>;
};
};
1 change: 1 addition & 0 deletions app/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ common:
build_only: true
integration_platforms:
- robin_nano
- robin_e3
- native_sim
tests:
app.default: {}
Expand Down
5 changes: 5 additions & 0 deletions boards/mks/robin_e3/Kconfig.robin_e3
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2021 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

config BOARD_ROBIN_E3
select SOC_STM32F103XE
7 changes: 7 additions & 0 deletions boards/mks/robin_e3/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (c) 2021 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

board_runner_args(jlink "--device=STM32F103XB" "--speed=4000")

include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
5 changes: 5 additions & 0 deletions boards/mks/robin_e3/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board:
name: robin_e3
vendor: mks
socs:
- name: stm32f103xe
Binary file not shown.
Binary file not shown.
Loading