Support Adesto flash #4

Closed
opened 2018-12-19 00:02:42 +00:00 by mithro · 3 comments

tinyprog does the following to support the Adesto flash;

        if flash_id[0:2] == [0x9D, 0x60]:
            # ISSI
            self.security_page_bit_offset = 4
            self.security_page_write_cmd = 0x62
            self.security_page_read_cmd = 0x68
            self.security_page_erase_cmd = 0x64
    
        else:
            # Adesto
            self.security_page_bit_offset = 0
            self.security_page_write_cmd = 0x42
            self.security_page_read_cmd = 0x48
            self.security_page_erase_cmd = 0x44
tinyprog does the following to support the Adesto flash; ```python if flash_id[0:2] == [0x9D, 0x60]: # ISSI self.security_page_bit_offset = 4 self.security_page_write_cmd = 0x62 self.security_page_read_cmd = 0x68 self.security_page_erase_cmd = 0x64 else: # Adesto self.security_page_bit_offset = 0 self.security_page_write_cmd = 0x42 self.security_page_read_cmd = 0x48 self.security_page_erase_cmd = 0x44 ```
Author

Currently I get the following behaviour;

Device ID: 14
Manufacturer ID: 1f
Memory type: 86
Memory size: 01
Serial number: ff ff ff ff
$ sudo ./fomu-flash -t 1 -w hello.txt
$ sudo ./fomu-flash -t 1 -v hello.txt
        0: file: 68   spi: ff
        1: file: 65   spi: ff
        2: file: 6c   spi: ff
        3: file: 6c   spi: ff
        4: file: 6f   spi: ff
        5: file: 0a   spi: ff
Currently I get the following behaviour; ```$ sudo ./fomu-flash -t 1 -i Device ID: 14 Manufacturer ID: 1f Memory type: 86 Memory size: 01 Serial number: ff ff ff ff $ sudo ./fomu-flash -t 1 -w hello.txt $ sudo ./fomu-flash -t 1 -v hello.txt 0: file: 68 spi: ff 1: file: 65 spi: ff 2: file: 6c spi: ff 3: file: 6c spi: ff 4: file: 6f spi: ff 5: file: 0a spi: ff ```
Owner

The Adesto flash has a writeable serial number that they call "Security Page". We could support writing this page in fomu-flash, however that is separate from supporting Adesto parts.

The issue was that the Adesto part appears to require a "Write Enable" call prior to the "Write Volatile" call. Or maybe that's what most parts require. Either way a quirk has been added that fixes this issue.

The Adesto flash has a writeable serial number that they call "Security Page". We could support writing this page in `fomu-flash`, however that is separate from supporting Adesto parts. The issue was that the Adesto part appears to require a "Write Enable" call prior to the "Write Volatile" call. Or maybe that's what most parts require. Either way a quirk has been added that fixes this issue.
xobs closed this issue 2018-12-19 03:32:41 +00:00
Owner
pi@raspberrypi:~/fomu-flash $ sudo ./fomu-flash -w hello.txt
Erasing @ 000000
Programming @ 000000
pi@raspberrypi:~/fomu-flash $ sudo ./fomu-flash -p 0
00000000 68 65 6c 6c 6f 0a ff ff  ff ff ff ff ff ff ff ff  |hello...........|
00000010 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
```sh pi@raspberrypi:~/fomu-flash $ sudo ./fomu-flash -w hello.txt Erasing @ 000000 Programming @ 000000 pi@raspberrypi:~/fomu-flash $ sudo ./fomu-flash -p 0 00000000 68 65 6c 6c 6f 0a ff ff ff ff ff ff ff ff ff ff |hello...........| 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| ```
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xobs/fomu-flash#4
No description provided.