Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void copy_ram_to_flash (uint32_t dest_flash_addr, uint32_t source_ram_addr, uint16_t num_bytes)
- {
- if (num_bytes > 1024)
- num_bytes = 4096;
- else if (num_bytes > 512)
- num_bytes = 1024;
- else if (num_bytes > 256)
- num_bytes = 512;
- else
- num_bytes = 256;
- command[0] = COPY_RAM_TO_FLASH;
- command[1] = dest_flash_addr;
- command[2] = source_ram_addr;
- command[3] = num_bytes;
- command[4] = __CORE_CLK / 1000;
- iap_entry (command, result);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement