Skip to content

Commit 3aabdf2

Browse files
projectgusdpgeorge
authored andcommitted
stm32/boards/B_L072Z_LRWAN1: Add pin definitions for internal SX1262.
Includes fixing the SCK connection pin. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <[email protected]>
1 parent cb31c0a commit 3aabdf2

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

ports/stm32/boards/B_L072Z_LRWAN1/mpconfigboard.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@
4040
#define MICROPY_HW_I2C1_SDA (pin_B9)
4141

4242
// SPI buses
43+
// SPI1 on the CMWX1ZZABZ module is connected internally to the SX1276
4344
#define MICROPY_HW_SPI1_NSS (pin_A15)
44-
#define MICROPY_HW_SPI1_SCK (pin_A5)
45+
#define MICROPY_HW_SPI1_SCK (pin_B3)
4546
#define MICROPY_HW_SPI1_MISO (pin_A6)
4647
#define MICROPY_HW_SPI1_MOSI (pin_A7)
4748
#define MICROPY_HW_SPI2_NSS (pin_B12)

ports/stm32/boards/B_L072Z_LRWAN1/pins.csv

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,26 @@ LED_RED,PB7
2929
,PA3
3030
,PA4
3131
,PA5
32-
,PA6
33-
,PA7
32+
SX_MISO,PA6
33+
SX_MOSI,PA7
3434
,PA8
3535
,PA9
3636
,PA10
3737
,PA11
38-
,PA12
38+
SX_TCXO_VCC,PA12
39+
# Note about SX_TCXO_VCC: Unlike all of the other SX_ pins, PA12 is only
40+
# connected to TCXO_VCC on the Discovery Board and will have a different
41+
# connection on custom hardware using the same Murata module.
42+
#
43+
# By default it also does nothing, need to move jumper JP9 to make it control
44+
# TCXO_VCC at all. Note PA12 is by default also USB DP so need to disable
45+
# USB - call pyb.usb_mode(None) or rebuild without MICROPY_HW_ENABLE_USB -
46+
# in order to use it at all.
3947
,PA13
4048
,PA14
41-
,PA15
49+
SX_CS,PA15
4250
,PB2
51+
SX_SCK,PB3
4352
,PB5
4453
,PB6
4554
,PB7
@@ -49,3 +58,8 @@ LED_RED,PB7
4958
,PB13
5059
,PB14
5160
,PB15
61+
SX_RESET,PC0
62+
SX_DIO0,PB4
63+
SX_DIO1,PB1
64+
SX_DIO2,PB0
65+
SX_DIO3,PC13

0 commit comments

Comments
 (0)