Mercurial > public > hwos_code
annotate src/external_flash.inc @ 322:fe06f1d1a285
FIX 16bits CNS feedback: assert CNS up to 999%
author | jDG |
---|---|
date | Fri, 12 Jun 2015 22:15:57 +0200 |
parents | eb758a5b44eb |
children | 789230298511 |
rev | line source |
---|---|
0 | 1 ;============================================================================= |
2 ; | |
3 ; File external_flash.inc | |
4 ; | |
5 ; | |
6 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. | |
7 ;============================================================================= | |
8 ; HISTORY | |
9 ; 2011-08-12 : [mH] creation | |
10 | |
11 ; Misc | |
12 extern ext_flash_power_down ; Put Flash in Deep Power Down | |
13 extern incf_ext_flash_address_p1 ; +1 for the ext_flash_address:3 | |
14 extern ext_flash_disable_protection; Disables write protection | |
15 extern ext_flash_enable_protection ; Enables write protection | |
281
eb758a5b44eb
BUGFIX: Fix download issue for dives made with 1.80 firmware
heinrichsweikamp
parents:
279
diff
changeset
|
16 extern fix_180_dives ; fix dives made with the 1.80 |
0 | 17 |
18 ; Writes | |
19 extern write_byte_ext_flash_plus ; Write from WREG and increase address after write with banking at 0x200000 | |
279 | 20 extern write_byte_ext_flash_plus_nocnt ; No increase of ext_flash_dive_counter:3 |
278
dfac47ac2e1d
BUGFIX: There was a 1:4096 chance that a portion of a dive was not stored correctly resulting in download issues
heinrichsweikamp
parents:
6
diff
changeset
|
21 extern write_byte_ext_flash_plus_nodel ; Does NOT delete 4kB Page when required |
0 | 22 extern write_byte_ext_flash_plus_header ; Write from WREG and increase address after write |
23 extern ext_flash_byte_write ; Writes one byte from WREG @ext_flash_address:3 | |
24 extern write_spi1 ; Just (dummy)write to read a byte | |
25 | |
26 ; Delelte | |
27 extern ext_flash_erase_logbook ; erases logbook memory (000000h -> 2FFFFFh -> 3MByte) | |
28 extern ext_flash_erase4kB ; Erases 4kB sector @ext_flash_address:3 | |
29 | |
30 ; Reads | |
31 extern ext_flash_read_block_start ; Block read start and reads one byte@ext_flash_address:3 into WREG | |
32 extern ext_flash_read_block ; Read another byte into WREG | |
33 extern ext_flash_read_block_stop ; Stop block read | |
34 extern ext_flash_byte_read ; Reads one byte@ext_flash_address:3 into WREG and temp1 | |
35 extern ext_flash_byte_read_plus ; Return data read in WREG and temp1 and increase address after read with banking at 0x200000 | |
36 extern ext_flash_byte_read_plus_0x20; Return data read in WREG and temp1 | |
37 | |
38 ; Will decrease ext_flash_address:2 with the 8Bit value "ext_flash_temp1" | |
39 extern decf_ext_flash_address0 | |
40 decf_ext_flash_address macro ext_flash_temp1 | |
41 movlw ext_flash_temp1 | |
42 call decf_ext_flash_address0 | |
43 endm | |
44 | |
45 extern incf_ext_flash_address0 | |
46 ; Will increase ext_flash_address:2 with the 8Bit value "ext_flash_temp1" | |
47 incf_ext_flash_address macro ext_flash_temp1 | |
48 movlw ext_flash_temp1 | |
49 call incf_ext_flash_address0 | |
50 endm | |
51 | |
52 ; With banking at 0x200000 | |
53 extern incf_ext_flash_address0_0x20 | |
54 ; Will increase ext_flash_address:2 with the 8Bit value "ext_flash_temp1" | |
55 incf_ext_flash_address_0x20 macro ext_flash_temp1 | |
56 movlw ext_flash_temp1 | |
57 call incf_ext_flash_address0_0x20 | |
58 endm | |
59 | |
60 |