Skip to content

Commit

Permalink
[doc][examples] update demo readme for bl702l
Browse files Browse the repository at this point in the history
  • Loading branch information
sakumisue committed Oct 19, 2023
1 parent 27c24dd commit a32af92
Show file tree
Hide file tree
Showing 77 changed files with 493 additions and 78 deletions.
7 changes: 7 additions & 0 deletions examples/peripherals/adc/adc_dma/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | |
|BL616/BL618 | |
|BL808 | |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
7 changes: 7 additions & 0 deletions examples/peripherals/adc/adc_int/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | |
|BL616/BL618 | |
|BL808 | D0 has no irq |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
7 changes: 7 additions & 0 deletions examples/peripherals/adc/adc_poll/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | |
|BL616/BL618 | |
|BL808 | |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
7 changes: 7 additions & 0 deletions examples/peripherals/adc/adc_poll_diff_mode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | |
|BL616/BL618 | |
|BL808 | |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
7 changes: 7 additions & 0 deletions examples/peripherals/adc/adc_tsen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | |
|BL616/BL618 | |
|BL808 | |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
7 changes: 7 additions & 0 deletions examples/peripherals/adc/adc_vbat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | |
|BL616/BL618 | |
|BL808 | |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
7 changes: 7 additions & 0 deletions examples/peripherals/cks/cks_dma/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | |
|BL616/BL618 | |
|BL808 | |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
7 changes: 7 additions & 0 deletions examples/peripherals/cks/cks_normal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | |
|BL616/BL618 | |
|BL808 | |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
7 changes: 7 additions & 0 deletions examples/peripherals/dma/dma_normal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | |
|BL616/BL618 | |
|BL808 | D0 has no irq in dma0~dma1, should use dma2 |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
7 changes: 7 additions & 0 deletions examples/peripherals/dma/dma_normal_cycle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | |
|BL616/BL618 | |
|BL808 | D0 has no irq in dma0~dma1, should use dma2 |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
7 changes: 7 additions & 0 deletions examples/peripherals/dma/dma_reduce_or_add/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | |
|BL616/BL618 | |
|BL808 | D0 has no irq in dma0~dma1, should use dma2 |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
7 changes: 7 additions & 0 deletions examples/peripherals/efuse/efuse_rw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | |
|BL616/BL618 | |
|BL808 | |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
7 changes: 7 additions & 0 deletions examples/peripherals/efuse/efuse_trim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | |
|BL616/BL618 | |
|BL808 | |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
4 changes: 3 additions & 1 deletion examples/peripherals/emac/emac_basic/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ATTR_NOCACHE_NOINIT_RAM_SECTION static uint8_t test_pattern[TEST_PATTERN_LEN] =

static volatile uint32_t tx_pkg_cnt = 0;
static volatile uint32_t tx_err_cnt = 0;
static volatile uint32_t tx_pkg_cnt_last = 0;

static volatile uint32_t rx_pkg_cnt = 0;
static volatile uint32_t rx_err_cnt = 0;
Expand Down Expand Up @@ -173,10 +174,11 @@ int main(void)
loop++;
if ((loop & 0xfffff) == 0) {
time = bflb_mtimer_get_time_ms();
printf("\r\nCurrent Bandwidth: %ldMbps\r\n", ((tx_pkg_cnt * 64 * 8) / (time * 1000)));
printf("\r\nCurrent Bandwidth: %ldMbps\r\n", (((tx_pkg_cnt - tx_pkg_cnt_last) * 64 * 8) / ((time - last_time) * 1000)));
printf("tx cnt: %ld, lose cnt: %ld\n\r", tx_pkg_cnt, tx_err_cnt);
printf("rx cnt: %ld, lose cnt: %ld, bytes: %ld\n\r", rx_pkg_cnt, rx_err_cnt, rx_bytes);
last_time = time;
tx_pkg_cnt_last = tx_pkg_cnt;
}
}

Expand Down
7 changes: 7 additions & 0 deletions examples/peripherals/flash/flash_dma/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | |
|BL616/BL618 | |
|BL808 | |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
7 changes: 7 additions & 0 deletions examples/peripherals/flash/flash_iomode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | Only support NIO and DO |
|BL616/BL618 | |
|BL808 | |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
7 changes: 7 additions & 0 deletions examples/peripherals/flash/flash_read_write/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
|:----------------:|:------:|
|BL602/BL604 | |
|BL702/BL704/BL706 | |
|BL702L/BL704L | |
|BL616/BL618 | |
|BL808 | |

Expand All @@ -24,6 +25,12 @@ make CHIP=bl602 BOARD=bl602dk
make CHIP=bl702 BOARD=bl702dk
```

- BL702L/BL704L

```
make CHIP=bl702l BOARD=bl702ldk
```

- BL616/BL618

```
Expand Down
17 changes: 8 additions & 9 deletions examples/peripherals/flash/flash_read_write/main.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#include "bflb_flash.h"
#include "board.h"

#define FLASH_RW_TOTAL_SIZE 512 * 1024
#define FLASH_RW_START_ADDR 0x10000
#define FLASH_RW_TOTAL_SIZE (10 * 4096)
#define FLASH_RW_START_ADDR 0x10000

static uint8_t write_buf[256];
static uint8_t read_buf[256];
static uint8_t write_buf[4096];
static uint8_t read_buf[4096];

int main(void)
{
uint32_t i,j;
uint32_t i, j;
uint32_t flash_addr;

board_init();
Expand All @@ -18,13 +18,12 @@ int main(void)
write_buf[i] = i;
}

for (uint32_t offset = 0; offset < FLASH_RW_TOTAL_SIZE; offset+=sizeof(write_buf)){

flash_addr=FLASH_RW_START_ADDR+offset;
for (uint32_t offset = 0; offset < FLASH_RW_TOTAL_SIZE; offset += sizeof(write_buf)) {
flash_addr = FLASH_RW_START_ADDR + offset;
printf("erase addr:%08x\r\n", flash_addr);

/* erase flash */
bflb_flash_erase(flash_addr,sizeof(write_buf));
bflb_flash_erase(flash_addr, sizeof(write_buf));

memset(read_buf, 0, sizeof(read_buf));
/* read flash data */
Expand Down
Loading

0 comments on commit a32af92

Please sign in to comment.