Forum | Documentation | Website | Blog

Skip to content
  • Vaishnav Achath's avatar
    update for write protection and fixed/variable manifests · 2559b36f
    Vaishnav Achath authored and Vaishnav Achath's avatar Vaishnav Achath committed
    
    
    fixed manifest will be written at production time and be made write protected
    write protection is disabled since it is irreversible (uncomment to enable)
    fixed manifest will be same as variable manifest for clicks with driver at production
    variable manifest can b changed later when linux driver is available later or when driver has an update
    variable manifest will be stored starting from next block after writing fixed manifest at address 0x0000
    
    algorithm for reading manifest:
    	read user eeprom byte(0x0A0A), this byte has start address of variable manifest(if this byte = 0, this means no variable manifest)
    	if (variable manifest available)
    		read variable manifest and continue with mikrobus probe
    	else (read fixed manfifest at addr 0x0000)
    		enable via userspace using information in fixed manfiest
    
    Zephyr Log:
    
    uart:~$ *** Booting Zephyr OS version 2.4.99  ***
    mikrobus: writing mikrobus fixed manifest at 0x0
    <inf> mikrobus: mikrobus fixed manifest read data:
                                       90 00 fe 01 08 00 01 00  01 02 00 00 18 00 02 00 |........ ........
                                       10 01 4d 69 6b 72 6f 45  6c 65 6b 74 72 6f 6e 69 |..MikroE lektroni
                                       6b 61 00 00 14 00 02 00  0d 02 4d 49 43 52 4f 53 |ka...... ..MICROS
                                       44 20 43 6c 69 63 6b 00  18 00 02 00 12 03 43 4c |D Click. ......CL
                                       49 43 4b 20 53 45 52 49  41 4c 4e 55 4d 42 45 52 |ICK SERI ALNUMBER
                                       10 00 05 00 04 01 07 07  06 06 05 05 05 05 02 01 |........ ........
                                       08 00 03 00 01 0a 00 00  08 00 04 00 01 00 01 0b |........ ........
                                       14 00 07 00 01 03 0b 00  40 42 0f 00 00 00 00 00 |........ @B......
                                       00 00 00 00 0c 00 02 00  06 04 73 70 69 64 65 76 |........ ..spidev
    <inf> mikrobus: writing mikrobus variable manifest at 0x100
    <inf> mikrobus: mikrobus variable manifest read data:
                                       7c 00 00 01 08 00 01 00  01 02 00 00 18 00 02 00 ||....... ........
                                       10 01 4d 69 6b 72 6f 45  6c 65 6b 74 72 6f 6e 69 |..MikroE lektroni
                                       6b 61 00 00 14 00 02 00  0d 02 4d 49 43 52 4f 53 |ka...... ..MICROS
                                       44 20 43 6c 69 63 6b 00  10 00 05 00 04 01 07 07 |D Click. ........
                                       06 06 05 05 05 05 02 01  08 00 03 00 01 0a 00 00 |........ ........
                                       08 00 04 00 01 00 01 0b  14 00 07 00 01 03 0b 00 |........ ........
                                       80 f0 fa 02 00 00 00 00  00 00 00 00 10 00 02 00 |........ ........
                                       07 03 6d 6d 63 5f 73 70  69 00 00 00             |..mmc_sp i...
    <dbg> mikrobus: mikrobus user eeprom bytes [0x0A0A]:
                                       00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |........ ........
                                       00 00                                            |..
    <dbg> mikrobus: mikrobus user eeprom bytes [0x0A0A]:
                                       01 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |........ ........
                                       00 00                                            |..
    <dbg> mikrobus: mikrobus eeprom protection control read bytes [0x0A00]:
                                       00 00 00 00 00 00 00 00  00 00                   |........ ..
    <dbg> mikrobus: mikrobus eeprom protection control write bytes [0x0A00]:
                                       55 00 00 00 00 00 00 00  00 00                   |U....... ..
    <inf> mikrobus: MIKROBUS MICROSD-CLICK MANIFEST written succesfully
    
    Signed-off-by: default avatarvaishnav <vaishnav@beagleboard.org>
    2559b36f