|
px-fwlib 0.10.0
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers generated with Doxygen 1.9.2
|
Microsoft UF2 bootloader over USB MSD (Mass Storage Device).
File(s):
References:
This module implements the Microsoft UF2 bootloader communication layer over USB MSD (Mass Storage Device). It emulates (fakes) a USB storage device with a FAT16 file system to provide info when reading files and writes a new app to FLASH if it is formatted using the UF2 tool.
Macros | |
| #define | PX_UF2_CFG_FLASH_START_ADR 0x00004000 |
| Start address of flash to write to (reserved space for bootloader) More... | |
| #define | PX_UF2_CFG_FLASH_SIZE 0x00020000 |
| Flash size. More... | |
| #define | PX_UF2_CFG_INFO_VERSION "1.0.0 F" |
| Info file version text. More... | |
| #define | PX_UF2_CFG_INFO_MODEL "PX-HERO" |
| Info file model text. More... | |
| #define | PX_UF2_CFG_INFO_BOARD_ID "STM32L072RB" |
| Info file board ID text. More... | |
| #define | PX_UF2_CFG_INDEX_URL "https://piconomix.com/px-fwlib/index.html" |
| index.htm file URL More... | |
| #define | PX_UF2_CFG_VOLUME_LABEL "HERO-BOOT " |
| FAT16 volume label. More... | |
| #define | PX_UF2_CFG_FAMILY_ID 0xe892273c |
| Family ID. More... | |
Typedefs | |
| typedef void(* | px_uf2_on_wr_flash_block_t) (const uint8_t *data, uint32_t adr, size_t nr_of_bytes) |
| Definition of a pointer to a function that will be called to write a block of data to flash. More... | |
| typedef void(* | px_uf2_on_wr_flash_done_t) (void) |
| Definition of a pointer to a function that will be called when last block has been written. More... | |
Functions | |
| void | px_uf2_init (px_uf2_on_wr_flash_block_t on_wr_flash_block, px_uf2_on_wr_flash_done_t on_wr_flash_done) |
| Initialise UF2 module. More... | |
| void | px_uf2_on_rd_sector (uint32_t sector_adr, uint8_t *buf) |
| Function that must be called when a 512 byte sector is read over USB Mass Storage. More... | |
| void | px_uf2_on_wr_sector (uint32_t sector_adr, const uint8_t *buf) |
| Function that must be called when a 512 byte sector is written over USB Mass Storage. More... | |
| #define PX_UF2_CFG_FLASH_START_ADR 0x00004000 |
Start address of flash to write to (reserved space for bootloader)
Definition at line 33 of file px_uf2_cfg_template.h.
| #define PX_UF2_CFG_FLASH_SIZE 0x00020000 |
Flash size.
Definition at line 36 of file px_uf2_cfg_template.h.
| #define PX_UF2_CFG_INFO_VERSION "1.0.0 F" |
Info file version text.
Definition at line 39 of file px_uf2_cfg_template.h.
| #define PX_UF2_CFG_INFO_MODEL "PX-HERO" |
Info file model text.
Definition at line 42 of file px_uf2_cfg_template.h.
| #define PX_UF2_CFG_INFO_BOARD_ID "STM32L072RB" |
Info file board ID text.
Definition at line 45 of file px_uf2_cfg_template.h.
| #define PX_UF2_CFG_INDEX_URL "https://piconomix.com/px-fwlib/index.html" |
index.htm file URL
Definition at line 48 of file px_uf2_cfg_template.h.
| #define PX_UF2_CFG_VOLUME_LABEL "HERO-BOOT " |
FAT16 volume label.
Definition at line 51 of file px_uf2_cfg_template.h.
| #define PX_UF2_CFG_FAMILY_ID 0xe892273c |
Family ID.
Definition at line 54 of file px_uf2_cfg_template.h.
| typedef void(* px_uf2_on_wr_flash_block_t) (const uint8_t *data, uint32_t adr, size_t nr_of_bytes) |
| typedef void(* px_uf2_on_wr_flash_done_t) (void) |
| void px_uf2_init | ( | px_uf2_on_wr_flash_block_t | on_wr_flash_block, |
| px_uf2_on_wr_flash_done_t | on_wr_flash_done | ||
| ) |
| void px_uf2_on_rd_sector | ( | uint32_t | sector_adr, |
| uint8_t * | buf | ||
| ) |