-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplatformio.ini
More file actions
79 lines (66 loc) · 2.23 KB
/
platformio.ini
File metadata and controls
79 lines (66 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:SIMPLEFOC_MICROSPORA]
platform = ststm32
board = genericSTM32G431CB
framework = arduino
lib_archive = false
monitor_speed = 250000
upload_protocol = dfu
monitor_dtr = 1
lib_deps =
Simple FOC
# SimpleFOCDrivers
https://github.com/simplefoc/Arduino-FOC-drivers.git#dev
SimpleCANio ; for CAN bus if necessary
build_flags =
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC ; Enable Serial Output
-D USBCON
# -D HAL_CORDIC_MODULE_ENABLED ; Enables the CORDIC module
-D HAL_FDCAN_MODULE_ENABLED ; Enables the CAN module
-D LED_BUILTIN=PC6 ; On-board LED
; Motor driver drv8316 - 6PWM
-D PHA_H=PA10 ; High-side PWM for phase A
-D PHA_L=PB15 ; Low-side PWM for phase A
-D PHB_H=PA9 ; High-side PWM for phase B
-D PHB_L=PB14 ; Low-side PWM for phase B
-D PHC_H=PA8 ; High-side PWM for phase C
-D PHC_L=PB13 ; Low-side PWM for phase C
-D ISENS_A=PA0 ; Phase A current sense
-D ISENS_B=PA1 ; Phase B current sense
-D ISENS_C=PA2 ; Phase C current sense
; driver pins - SPI interface
-D DRV_MOSI=PB5_ALT1
-D DRV_MISO=PB4_ALT1
-D DRV_SCK=PC10
-D DRV_CS=PC4
; MT6701 14bit Magnetic encoder
-D ENC_SDO=PA6 ; configured as MISO
-D ENC_NC=PA7 ; Not connected (dummy MOSI)
-D ENC_CLK=PA5
-D ENC_CS=PA4
; 1044 CAN Transceiver
-D CAN_RX=PB8 ; CAN Receive Pin
-D CAN_TX=PB9 ; CAN Transmit Pin
-D CAN_ENABLE=PC13 ; CAN Transmit Pin
; Voltage Divider
-D VSENS=PB11 ; Voltage sense pin
-D VSCALE=11.0 ; Scaling factor 4.7k and 47k resistors
; Additional aliases
-D PIN_PHASE_UH=PHA_H
-D PIN_PHASE_UL=PHA_L
-D PIN_PHASE_VH=PHB_H
-D PIN_PHASE_VL=PHB_L
-D PIN_PHASE_WH=PHC_H
-D PIN_PHASE_WL=PHC_L
; debug options
-D SIMPLEFOC_DEBUG_ENABLED
-D CAN_DEBUG ; Enable CAN debug messages
; -D SIMPLEFOC_DISABLE_DEBUG