Add note on Flash to Pyboard D section.

pull/15/head
Peter Hinch 2020-07-14 16:11:30 +01:00
rodzic ac459af6ce
commit dd72be0eeb
2 zmienionych plików z 22 dodań i 5 usunięć

Wyświetl plik

@ -134,7 +134,9 @@ comments in [the test script](./soft_wdt/swdt_tests.py).
## 4.4 Reverse
Fast [reverse](./reverse/reverse.py) a bytearray in Arm Thumb assembler.
Fast [reverse](./reverse/reverse.py) a bytearray in Arm Thumb assembler: this
reverses the byte order of the array so `[1,2,3,4]` becomes `[4,3,2,1]`.
Also includes cross-platform Python code to bit-reverse (fast-ish) 8, 16 and 32
bit words.

Wyświetl plik

@ -52,11 +52,26 @@ wl.config(antenna=value) # 0 internal 1 external
wl.config(txpower=value) # In dbm
```
## Variants
## Flash memory
I am aware of two variants distinguished by the sticker on top of the CPU.
1. SF2W (blue). This has about 178K of free RAM and 2MB of Flash.
2. SF6W (red). This has 432K of free RAM. Also has 2MB Flash.
The SF2W and SF3W have 512KiB of internal flash, the SF6W has 2048KiB. All
have two external 2048KiB flash chips, one for the filesystem and the other for
executable code (it can be memory mapped). On SF2W and SF3W, if you freeze a
lot of code the firmware can become too big for the internal flash. To put
frozen code in external flash, edit the file
`ports/stm32/boards/PYBD_SF2/f722_qspi.ld` (or the corresponding one for
`PYBD_SF3` to add the line `*frozen_content.o(.text* .rodata*)`:
```
.text_ext :
{
. = ALIGN(4);
*frozen_content.o(.text* .rodata*)
*lib/btstack/*(.text* .rodata*)
*lib/mbedtls/*(.text* .rodata*)
. = ALIGN(512);
*(.big_const*)
```
## Bootloader