Skip to content

Commit 4185f9c

Browse files
committed
[nRF52] add ZD25Q32D into list of possible QSPI flash memory ICs [skip ci]
1 parent 6e68ab9 commit 4185f9c

4 files changed

Lines changed: 46 additions & 5 deletions

File tree

software/firmware/source/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ $ make ihex
226226

227227
You will need to have an ST-LINK/V2 USB adapter connected in order to put the firmware into your hardware's flash memory.<br>
228228

229-
1. Follow [these official instructions](https://github.com/stm32duino/wiki/wiki/Getting-Started)
229+
1. Follow these official instructions [Version 1.x](https://github.com/stm32duino/Arduino_Core_STM32/tree/1.9.0#getting-started) or [Version 2.x](https://github.com/stm32duino/Arduino_Core_STM32/tree/2.4.0#getting-started)
230230
to install Arduino IDE and **certain version** of Arduino STM32 Core -<!-- [latest **stable** Arduino STM32 Core](https://github.com/stm32duino/Arduino_Core_STM32/releases/tag/1.9.0) (1.9.0) --><br>
231231
For **S76G**:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[**1.9.0**](https://github.com/stm32duino/Arduino_Core_STM32/releases/tag/1.9.0)<br>
232232
For **STM32F103C8** "Blue Pill":&nbsp;&nbsp;&nbsp;[**1.9.0**](https://github.com/stm32duino/Arduino_Core_STM32/releases/tag/1.9.0)<br>

software/firmware/source/SoftRF/src/platform/iomap/LilyGO_TEcho_Card.h

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#define SOC_GPIO_PIN_GNSS_TEC_PPS _PINNUM(0, 23) // P0.23
1111
#define SOC_GPIO_PIN_GNSS_TEC_WKE _PINNUM(0, 25) // P0.25
12-
#define SOC_GPIO_PIN_GNSS_TEC_PWR _PINNUM(1, 15) // P1.15 active LOW ?
12+
#define SOC_GPIO_PIN_GNSS_TEC_PWR _PINNUM(1, 15) // P1.15 active LOW
1313
#define SOC_GPIO_PIN_GNSS_TEC_SW _PINNUM(0, 29) // P0.29 active HIGH ?
1414

1515
/* SPI */
@@ -18,7 +18,7 @@
1818
#define SOC_GPIO_PIN_TEC_SCK _PINNUM(0, 13) // P0.13
1919
#define SOC_GPIO_PIN_TEC_SS _PINNUM(0, 11) // P0.11
2020

21-
/* SX1262 (AcSiP S68F) */
21+
/* SX1262 (AcSiP S62F) */
2222
#define SOC_GPIO_PIN_TEC_RST _PINNUM(0, 7) // P0.07
2323
#define SOC_GPIO_PIN_TEC_DIO1 _PINNUM(1, 8) // P1.08
2424
#define SOC_GPIO_PIN_TEC_DIO2 _PINNUM(0, 5) // P0.05
@@ -40,6 +40,9 @@
4040
#define SOC_GPIO_PIN_TEC_BUTTON _PINNUM(1, 10) // P1.10 active LOW
4141
#define SOC_GPIO_PIN_TEC_BOOT _PINNUM(0, 24) // P0.24 active LOW
4242

43+
/* LED */
44+
#define SOC_GPIO_LED_TEC_LED _PINNUM(1, 14) // P1.14
45+
4346
/* NeoPixels */
4447
#define SOC_GPIO_LED_TEC_LED1 _PINNUM(0, 28) // P0.28
4548
#define SOC_GPIO_LED_TEC_LED2 _PINNUM(1, 7) // P1.07
@@ -84,6 +87,20 @@
8487
}
8588
#endif /* ZD25WQ32C */
8689

90+
#if !defined(ZD25Q32D)
91+
// Settings for the Zetta Device ZD25Q32D 4MiB SPI flash.
92+
#define ZD25Q32D \
93+
{ \
94+
.total_size = (1UL << 22), /* 4 MiB */ \
95+
.start_up_time_us = 12000, .manufacturer_id = 0xba, \
96+
.memory_type = 0x40, .capacity = 0x16, .max_clock_speed_mhz = 133, \
97+
.quad_enable_bit_mask = 0x02, .has_sector_protection = false, \
98+
.supports_fast_read = true, .supports_qspi = true, \
99+
.supports_qspi_writes = true, .write_status_register_split = true, \
100+
.single_status_byte = false, .is_fram = false, \
101+
}
102+
#endif /* ZD25Q32D */
103+
87104
/* ADC */
88105
#define SOC_GPIO_PIN_TEC_BATTERY _PINNUM(0, 2) // P0.02 100K-!00K
89106
#define SOC_GPIO_PIN_TEC_VBAT_EN _PINNUM(0, 31) // P0.31 active HIGH

software/firmware/source/SoftRF/src/platform/iomap/LilyGO_TImpulse_Plus.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#define SOC_GPIO_PIN_TIP_SCK _PINNUM(0, 3) // P0.03
1717
#define SOC_GPIO_PIN_TIP_SS _PINNUM(1, 14) // P1.14
1818

19-
/* SX1262 (AcSiP S68F) */
19+
/* SX1262 (AcSiP S62F) */
2020
#define SOC_GPIO_PIN_TIP_RST _PINNUM(0, 2) // P0.02
2121
#define SOC_GPIO_PIN_TIP_DIO1 _PINNUM(0, 29) // P0.29
2222
#define SOC_GPIO_PIN_TIP_DIO2 _PINNUM(1, 15) // P1.15
@@ -57,6 +57,7 @@
5757
#define SOC_GPIO_PIN_SFL_TIP_HOLD _PINNUM(0, 26) // P0.26
5858
#define SOC_GPIO_PIN_SFL_TIP_WP _PINNUM(0, 8) // P0.08
5959

60+
#if !defined(ZD25WQ32C)
6061
// Settings for the Zetta Device ZD25WQ32C 4MiB SPI flash.
6162
// Datasheet: http://en.zettadevice.com/uploads/files/1009/WQ32C/1665301640977617c282766299.pdf
6263
#define ZD25WQ32C \
@@ -69,6 +70,21 @@
6970
.supports_qspi_writes = true, .write_status_register_split = false, \
7071
.single_status_byte = false, .is_fram = false, \
7172
}
73+
#endif /* ZD25WQ32C */
74+
75+
#if !defined(ZD25Q32D)
76+
// Settings for the Zetta Device ZD25Q32D 4MiB SPI flash.
77+
#define ZD25Q32D \
78+
{ \
79+
.total_size = (1UL << 22), /* 4 MiB */ \
80+
.start_up_time_us = 12000, .manufacturer_id = 0xba, \
81+
.memory_type = 0x40, .capacity = 0x16, .max_clock_speed_mhz = 133, \
82+
.quad_enable_bit_mask = 0x02, .has_sector_protection = false, \
83+
.supports_fast_read = true, .supports_qspi = true, \
84+
.supports_qspi_writes = true, .write_status_register_split = true, \
85+
.single_status_byte = false, .is_fram = false, \
86+
}
87+
#endif /* ZD25Q32D */
7288

7389
/* ADC */
7490
#define SOC_GPIO_PIN_TIP_BATTERY _PINNUM(0, 5) // P0.05 100K-!00K

software/firmware/source/SoftRF/src/platform/nRF52.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@ static uint8_t mx25_status_config[3] = {0x00, 0x00, 0x00};
244244
enum {
245245
MX25R1635F_INDEX,
246246
ZD25WQ16B_INDEX,
247+
247248
ZD25WQ32C_INDEX,
249+
ZD25Q32D_INDEX,
248250

249251
GD25Q64C_INDEX,
250252
#if !defined(EXCLUDE_WIP)
@@ -259,8 +261,11 @@ static SPIFlash_Device_t possible_devices[] = {
259261
[MX25R1635F_INDEX] = MX25R1635F,
260262
// LilyGO T-Echo
261263
[ZD25WQ16B_INDEX] = ZD25WQ16B,
262-
// LilyGO T-Impulse Plus
264+
265+
// LilyGO T-Impulse Plus, T-Echo Card
263266
[ZD25WQ32C_INDEX] = ZD25WQ32C,
267+
[ZD25Q32D_INDEX] = ZD25Q32D,
268+
264269
// Seeed T1000-E, X1
265270
[GD25Q64C_INDEX] = GD25Q64C,
266271
#if !defined(EXCLUDE_WIP)
@@ -1751,6 +1756,9 @@ static void nRF52_setup()
17511756
lmic_pins.rst = SOC_GPIO_PIN_TIP_RST;
17521757
lmic_pins.busy = SOC_GPIO_PIN_TIP_BUSY;
17531758

1759+
lmic_pins.txe = SOC_GPIO_PIN_TIP_TX_EN;
1760+
lmic_pins.rxe = SOC_GPIO_PIN_TIP_RX_EN;
1761+
17541762
pinMode(SOC_GPIO_PIN_TIP_INT1, INPUT);
17551763
pinMode(SOC_GPIO_PIN_TIP_INT2, INPUT);
17561764

0 commit comments

Comments
 (0)