Midnight Sun Firmware
Loading...
Searching...
No Matches
Bootloader_dfu

bootloader_dfu Firmware More...

Classes

struct  BootloaderDFUInfo
 Stores info needed for the DFU process. More...
 

Functions

BootloaderError bootloader_dfu_init (uintptr_t current_write_address)
 Initializes the BootloaderDFUInfo struct. More...
 
BootloaderError bootloader_dfu_flash (PacketManager *pm, uint8_t *flash_buffer)
 Flash page onto flash memory. More...
 
BootloaderError bootloader_jump_app ()
 Jumps to application vector table. More...
 
BootloaderError bootloader_fault ()
 If any errors/faults arise, reset the board. More...
 

Detailed Description

bootloader_dfu Firmware

Function Documentation

◆ bootloader_dfu_flash()

BootloaderError bootloader_dfu_flash ( PacketManager pm,
uint8_t *  flash_buffer 
)

Flash page onto flash memory.

Called by bootloader_receive_data function in bootloader_packet_handler.c

Parameters
pmPointer to the packet manager
datagramCAN datagram
flash_bufferFlash buffer which should have 2KB of data
Returns
BOOTLOADER_ERROR_NONE on success

◆ bootloader_dfu_init()

BootloaderError bootloader_dfu_init ( uintptr_t  current_write_address)

Initializes the BootloaderDFUInfo struct.

Parameters
current_write_addressThe current write address
Returns
BOOTLOADER_ERROR_NONE on success

◆ bootloader_fault()

BootloaderError bootloader_fault ( )

If any errors/faults arise, reset the board.

Returns
BootloaderError

◆ bootloader_jump_app()

BootloaderError bootloader_jump_app ( )

Jumps to application vector table.

Returns
Should never return

Jumps to application vector table.

Exits bootloader and jumps to main application

Returns
BOOTLOADER_INTERNAL_ERR. This function should never return