Skip to content

Commit b639f7b

Browse files
BryanSouza91deadprogram
authored andcommitted
added support for P25Q16H flash chip for xiao-ble target;
1 parent 28d625a commit b639f7b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

flash/devices.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ var DefaultDeviceIdentifier = DeviceIdentifierFunc(func(id JedecID) Attrs {
4646
return GD25Q16C()
4747
case 0xC84017:
4848
return GD25Q64C()
49+
case 0x856015:
50+
return P25Q16H()
4951
case 0xEF4014:
5052
return W25Q80DV()
5153
case 0xEF4015:
@@ -241,6 +243,24 @@ func GD25Q64C() Attrs {
241243
}
242244
}
243245

246+
// Settings for the Puya P25Q16H 2MiB SPI flash.
247+
// Datasheet: https://files.seeedstudio.com/wiki/github_weiruanexample/Flash_P25Q16H-UXH-IR_Datasheet.pdf
248+
func P25Q16H() Attrs {
249+
return Attrs{
250+
TotalSize: 1 << 21, // 2 MiB
251+
StartUp: 5000 * time.Microsecond,
252+
JedecID: JedecID{0x85, 0x60, 0x15},
253+
MaxClockSpeedMHz: 55,
254+
QuadEnableBitMask: 0x02,
255+
HasSectorProtection: true,
256+
SupportsFastRead: true,
257+
SupportsQSPI: true,
258+
SupportsQSPIWrites: true,
259+
WriteStatusSplit: true,
260+
SingleStatusByte: false,
261+
}
262+
}
263+
244264
// Settings for the Winbond W25Q16JV-IQ 2MiB SPI flash. Note that JV-IM has a
245265
// different .memory_type (0x70) Datasheet:
246266
// https://www.winbond.com/resource-files/w25q16jv%20spi%20revf%2005092017.pdf

0 commit comments

Comments
 (0)