---
name: "__BOOT_SIGROW_READ"
section: "3avr"
platform: "linux"
package: "avr-libc"
version: "1:1.8.0+Atmel3.5.0-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://carta.tech/man/boot.h"
---

# \_\_BOOT\_SIGROW\_READ(3avr)

Part of [boot.h(3avr)](/man/boot.h/3avr.md).

## NAME

boot.h -

## SYNOPSIS

### Macros

\#define **BOOTLOADER\_SECTION**   **\_\_attribute\_\_** ((section ('.bootloader')))\
 \#define **\_\_COMMON\_ASB**   RWWSB\
 \#define **\_\_COMMON\_ASRE**   RWWSRE\
 \#define **BLB12**   5\
 \#define **BLB11**   4\
 \#define **BLB02**   3\
 \#define **BLB01**   2\
 \#define **boot\_spm\_interrupt\_enable**()   (\_\_SPM\_REG \|= (**uint8\_t**)**\_BV**(SPMIE))\
 \#define **boot\_spm\_interrupt\_disable**()   (\_\_SPM\_REG &= (**uint8\_t**)~**\_BV**(SPMIE))\
 \#define **boot\_is\_spm\_interrupt**()   (\_\_SPM\_REG & (**uint8\_t**)**\_BV**(SPMIE))\
 \#define **boot\_rww\_busy**()   (\_\_SPM\_REG & (**uint8\_t**)**\_BV**(\_\_COMMON\_ASB))\
 \#define **boot\_spm\_busy**()   (\_\_SPM\_REG & (**uint8\_t**)**\_BV**(\_\_SPM\_ENABLE))\
 \#define **boot\_spm\_busy\_wait**()   do{}while(**boot\_spm\_busy**())\
 \#define **\_\_BOOT\_PAGE\_ERASE**   (**\_BV**(\_\_SPM\_ENABLE) \| **\_BV**(PGERS))\
 \#define **\_\_BOOT\_PAGE\_WRITE**   (**\_BV**(\_\_SPM\_ENABLE) \| **\_BV**(PGWRT))\
 \#define **\_\_BOOT\_PAGE\_FILL**   **\_BV**(\_\_SPM\_ENABLE)\
 \#define **\_\_BOOT\_RWW\_ENABLE**   (**\_BV**(\_\_SPM\_ENABLE) \| **\_BV**(\_\_COMMON\_ASRE))\
 \#define **\_\_boot\_page\_fill\_normal**(address,  data)\
 \#define **\_\_boot\_page\_fill\_alternate**(address,  data)\
 \#define **\_\_boot\_page\_fill\_extended**(address,  data)\
 \#define **\_\_boot\_page\_erase\_normal**(address)\
 \#define **\_\_boot\_page\_erase\_alternate**(address)\
 \#define **\_\_boot\_page\_erase\_extended**(address)\
 \#define **\_\_boot\_page\_write\_normal**(address)\
 \#define **\_\_boot\_page\_write\_alternate**(address)\
 \#define **\_\_boot\_page\_write\_extended**(address)\
 \#define **\_\_boot\_rww\_enable**()\
 \#define **\_\_boot\_rww\_enable\_alternate**()\
 \#define **\_\_boot\_lock\_bits\_set**(lock\_bits)\
 \#define **\_\_boot\_lock\_bits\_set\_alternate**(lock\_bits)\
 \#define **GET\_LOW\_FUSE\_BITS**   (0x0000)\
 \#define **GET\_LOCK\_BITS**   (0x0001)\
 \#define **GET\_EXTENDED\_FUSE\_BITS**   (0x0002)\
 \#define **GET\_HIGH\_FUSE\_BITS**   (0x0003)\
 \#define **boot\_lock\_fuse\_bits\_get**(address)\
 \#define **\_\_BOOT\_SIGROW\_READ**   (**\_BV**(\_\_SPM\_ENABLE) \| **\_BV**(SIGRD))\
 \#define **boot\_signature\_byte\_get**(addr)\
 \#define **boot\_page\_fill**(address,  data)   \_\_boot\_page\_fill\_normal(address, data)\
 \#define **boot\_page\_erase**(address)   \_\_boot\_page\_erase\_normal(address)\
 \#define **boot\_page\_write**(address)   \_\_boot\_page\_write\_normal(address)\
 \#define **boot\_rww\_enable**()   \_\_boot\_rww\_enable()\
 \#define **boot\_lock\_bits\_set**(lock\_bits)   \_\_boot\_lock\_bits\_set(lock\_bits)\
 \#define **boot\_page\_fill\_safe**(address,  data)\
 \#define **boot\_page\_erase\_safe**(address)\
 \#define **boot\_page\_write\_safe**(address)\
 \#define **boot\_rww\_enable\_safe**()\
 \#define **boot\_lock\_bits\_set\_safe**(lock\_bits)\

## Macro Definition Documentation

### #define \_\_boot\_lock\_bits\_set(lock\_bits)

**Value:**

```
(__extension__({                                           \
    uint8_t value = (uint8_t)(~(lock_bits));                   __asm__ __volatile__                                       (                                                              "ldi r30, 10t"                                           "ldi r31, 00t"                                           "mov r0, %20t"                                           "sts %0, %10t"                                           "spm0t"                                                  :                                                          : "i" (_SFR_MEM_ADDR(__SPM_REG)),                            "r" ((uint8_t)(__BOOT_LOCK_BITS_SET)),                     "r" (value)                                              : "r0", "r30", "r31"                                   );                                                     }))
```

### #define \_\_boot\_lock\_bits\_set\_alternate(lock\_bits)

**Value:**

```
(__extension__({                                           \
    uint8_t value = (uint8_t)(~(lock_bits));                   __asm__ __volatile__                                       (                                                              "ldi r30, 10t"                                           "ldi r31, 00t"                                           "mov r0, %20t"                                           "sts %0, %10t"                                           "spm0t"                                                  ".word 0xffff0t"                                         "nop0t"                                                  :                                                          : "i" (_SFR_MEM_ADDR(__SPM_REG)),                            "r" ((uint8_t)(__BOOT_LOCK_BITS_SET)),                     "r" (value)                                              : "r0", "r30", "r31"                                   );                                                     }))
```

### #define \_\_boot\_page\_erase\_alternate(address)

**Value:**

```
(__extension__({                                     __asm__ __volatile__                             (                                                    "sts %0, %10t"                                 "spm0t"                                        ".word 0xffff0t"                               "nop0t"                                        :                                                : "i" (_SFR_MEM_ADDR(__SPM_REG)),                  "r" ((uint8_t)(__BOOT_PAGE_ERASE)),              "z" ((uint16_t)(address))                  );                                           }))
```

### #define \_\_boot\_page\_erase\_extended(address)

**Value:**

```
(__extension__({                                     __asm__ __volatile__                             (                                                    "movw r30, %A30t"                              "sts  %1, %C30t"                               "sts %0, %20t"                                 "spm0t"                                        :                                                : "i" (_SFR_MEM_ADDR(__SPM_REG)),                  "i" (_SFR_MEM_ADDR(RAMPZ)),                      "r" ((uint8_t)(__BOOT_PAGE_ERASE)),              "r" ((uint32_t)(address))                      : "r30", "r31"                               );                                           }))
```

### #define \_\_boot\_page\_erase\_normal(address)

**Value:**

```
(__extension__({                                     __asm__ __volatile__                             (                                                    "sts %0, %10t"                                 "spm0t"                                        :                                                : "i" (_SFR_MEM_ADDR(__SPM_REG)),                  "r" ((uint8_t)(__BOOT_PAGE_ERASE)),              "z" ((uint16_t)(address))                  );                                           }))
```

### #define \_\_boot\_page\_fill\_alternate(address, data)

**Value:**

```
(__extension__({                                     __asm__ __volatile__                             (                                                    "movw  r0, %30t"                               "sts %0, %10t"                                 "spm0t"                                        ".word 0xffff0t"                               "nop0t"                                        "clr  r10t"                                    :                                                : "i" (_SFR_MEM_ADDR(__SPM_REG)),                  "r" ((uint8_t)(__BOOT_PAGE_FILL)),               "z" ((uint16_t)(address)),                       "r" ((uint16_t)(data))                         : "r0"                                       );                                           }))
```

### #define \_\_boot\_page\_fill\_extended(address, data)

**Value:**

```
(__extension__({                                     __asm__ __volatile__                             (                                                    "movw  r0, %40t"                               "movw r30, %A30t"                              "sts %1, %C30t"                                "sts %0, %20t"                                 "spm0t"                                        "clr  r10t"                                    :                                                : "i" (_SFR_MEM_ADDR(__SPM_REG)),                  "i" (_SFR_MEM_ADDR(RAMPZ)),                      "r" ((uint8_t)(__BOOT_PAGE_FILL)),               "r" ((uint32_t)(address)),                       "r" ((uint16_t)(data))                         : "r0", "r30", "r31"                         );                                           }))
```

### #define \_\_boot\_page\_fill\_normal(address, data)

**Value:**

```
(__extension__({                                     __asm__ __volatile__                             (                                                    "movw  r0, %30t"                               "sts %0, %10t"                                 "spm0t"                                        "clr  r10t"                                    :                                                : "i" (_SFR_MEM_ADDR(__SPM_REG)),                  "r" ((uint8_t)(__BOOT_PAGE_FILL)),               "z" ((uint16_t)(address)),                       "r" ((uint16_t)(data))                         : "r0"                                       );                                           }))
```

### #define \_\_boot\_page\_write\_alternate(address)

**Value:**

```
(__extension__({                                     __asm__ __volatile__                             (                                                    "sts %0, %10t"                                 "spm0t"                                        ".word 0xffff0t"                               "nop0t"                                        :                                                : "i" (_SFR_MEM_ADDR(__SPM_REG)),                  "r" ((uint8_t)(__BOOT_PAGE_WRITE)),              "z" ((uint16_t)(address))                  );                                           }))
```

### #define \_\_boot\_page\_write\_extended(address)

**Value:**

```
(__extension__({                                     __asm__ __volatile__                             (                                                    "movw r30, %A30t"                              "sts %1, %C30t"                                "sts %0, %20t"                                 "spm0t"                                        :                                                : "i" (_SFR_MEM_ADDR(__SPM_REG)),                  "i" (_SFR_MEM_ADDR(RAMPZ)),                      "r" ((uint8_t)(__BOOT_PAGE_WRITE)),              "r" ((uint32_t)(address))                      : "r30", "r31"                               );                                           }))
```

### #define \_\_boot\_page\_write\_normal(address)

**Value:**

```
(__extension__({                                     __asm__ __volatile__                             (                                                    "sts %0, %10t"                                 "spm0t"                                        :                                                : "i" (_SFR_MEM_ADDR(__SPM_REG)),                  "r" ((uint8_t)(__BOOT_PAGE_WRITE)),              "z" ((uint16_t)(address))                  );                                           }))
```

### #define \_\_boot\_rww\_enable()

**Value:**

```
(__extension__({                                     __asm__ __volatile__                             (                                                    "sts %0, %10t"                                 "spm0t"                                        :                                                : "i" (_SFR_MEM_ADDR(__SPM_REG)),                  "r" ((uint8_t)(__BOOT_RWW_ENABLE))         );                                           }))
```

### #define \_\_boot\_rww\_enable\_alternate()

**Value:**

```
(__extension__({                                     __asm__ __volatile__                             (                                                    "sts %0, %10t"                                 "spm0t"                                        ".word 0xffff0t"                               "nop0t"                                        :                                                : "i" (_SFR_MEM_ADDR(__SPM_REG)),                  "r" ((uint8_t)(__BOOT_RWW_ENABLE))         );                                           }))
```

## Author

Generated automatically by Doxygen for avr-libc from the source code.
