OpenOCD
kinetis_ke.c File Reference
Include dependency graph for kinetis_ke.c:

Go to the source code of this file.

Data Structures

struct  kinetis_ke_flash_bank
 

Macros

#define FTMRX_CMD_ALLERASED   0x01
 
#define FTMRX_CMD_BLOCKERASED   0x02
 
#define FTMRX_CMD_CONFIGNVM   0x0F
 
#define FTMRX_CMD_ERASEALL   0x08
 
#define FTMRX_CMD_ERASEBLOCK   0x09
 
#define FTMRX_CMD_ERASESECTOR   0x0A
 
#define FTMRX_CMD_PROGFLASH   0x06
 
#define FTMRX_CMD_PROGONCE   0x07
 
#define FTMRX_CMD_READONCE   0x04
 
#define FTMRX_CMD_SECTIONERASED   0x03
 
#define FTMRX_CMD_SETFACTORYLVL   0x0E
 
#define FTMRX_CMD_SETMARGINLVL   0x0D
 
#define FTMRX_CMD_UNSECURE   0x0B
 
#define FTMRX_CMD_VERIFYACCESS   0x0C
 
#define FTMRX_ERROR_ACCERR   0x20
 
#define FTMRX_ERROR_FPVIOL   0x10
 
#define FTMRX_FCLKDIV_FDIV(x)   (((uint8_t)(((uint8_t)(x))<<FTMRX_FCLKDIV_FDIV_SHIFT))&FTMRX_FCLKDIV_FDIV_MASK)
 
#define FTMRX_FCLKDIV_FDIV_MASK   0x3F
 
#define FTMRX_FCLKDIV_FDIV_SHIFT   0
 
#define FTMRX_FCLKDIV_FDIVLCK_MASK   0x40
 
#define FTMRX_FCLKDIV_FDIVLCK_SHIFT   6
 
#define FTMRX_FCLKDIV_FDIVLD_MASK   0x80
 
#define FTMRX_FCLKDIV_FDIVLD_SHIFT   7
 
#define FTMRX_FSTAT_CCIF_MASK   0x80
 
#define FTMRX_FSTAT_MGSTAT0_MASK   0x01
 
#define FTMRX_FSTAT_MGSTAT1_MASK   0x02
 
#define ICS_C1   0x40064000
 
#define ICS_C2   0x40064001
 
#define ICS_C2_BDIV(x)   (((uint8_t)(((uint8_t)(x))<<ICS_C2_BDIV_SHIFT))&ICS_C2_BDIV_MASK)
 
#define ICS_C2_BDIV_MASK   0xE0
 
#define ICS_C2_BDIV_SHIFT   5
 
#define ICS_C3   0x40064002
 
#define ICS_C4   0x40064003
 
#define ICS_C4_SCFTRIM_MASK   0x1
 
#define ICS_S   0x40064004
 
#define ICS_S_LOCK_MASK   0x40
 
#define KINETIS_KE_SRSID_FAMID(x)   ((x >> 28) & 0x0F)
 
#define KINETIS_KE_SRSID_KEX2   0x02
 
#define KINETIS_KE_SRSID_KEX4   0x04
 
#define KINETIS_KE_SRSID_KEX6   0x06
 
#define KINETIS_KE_SRSID_PINCOUNT(x)   ((x >> 16) & 0x0F)
 
#define KINETIS_KE_SRSID_SUBFAMID(x)   ((x >> 24) & 0x0F)
 
#define MDM_ACCESS_TIMEOUT   3000 /* iterations */
 
#define MDM_REG_CTRL   0x04
 
#define MDM_REG_ID   0xfc
 
#define MDM_REG_STAT   0x00
 
#define MDM_STAT_BACKDOOREN   (1<<6)
 
#define MDM_STAT_CORE_HALTED   (1<<16)
 
#define MDM_STAT_CORE_SLEEPDEEP   (1<<17)
 
#define MDM_STAT_CORESLEEPING   (1<<18)
 
#define MDM_STAT_FMEACK   (1<<0)
 
#define MDM_STAT_FMEEN   (1<<5)
 
#define MDM_STAT_FREADY   (1<<1)
 
#define MDM_STAT_LLSMODEXIT   (1<<9)
 
#define MDM_STAT_LPEN   (1<<7)
 
#define MDM_STAT_SYSRES   (1<<3)
 
#define MDM_STAT_SYSSEC   (1<<2)
 
#define MDM_STAT_VLLSXMODEXIT   (1<<10)
 
#define MDM_STAT_VLPEN   (1<<8)
 
#define MEM_CTRL_CORE_HOLD_RES   (1<<4)
 
#define MEM_CTRL_DBG_DIS   (1<<1)
 
#define MEM_CTRL_DBG_REQ   (1<<2)
 
#define MEM_CTRL_FMEIP   (1<<0)
 
#define MEM_CTRL_SYS_RES_REQ   (1<<3)
 
#define MEM_CTRL_VLLSX_DBG_ACK   (1<<6)
 
#define MEM_CTRL_VLLSX_DBG_REQ   (1<<5)
 
#define MEM_CTRL_VLLSX_STAT_ACK   (1<<7)
 
#define SIM_BUSDIV   0x40048018
 
#define SIM_CLKDIV_KE04_16_20_24   0x4004801C
 
#define SIM_CLKDIV_KE04_44_64_80   0x40048024
 
#define SIM_CLKDIV_KE06   0x40048024
 
#define SIM_CLKDIV_OUTDIV2_MASK   0x1000000
 
#define SIM_SRSID   0x40048000
 
#define WDOG_CS1   0x40052000
 

Functions

 COMMAND_HANDLER (kinetis_ke_check_flash_security_status)
 
 COMMAND_HANDLER (kinetis_ke_disable_wdog_handler)
 
 COMMAND_HANDLER (kinetis_ke_mdm_mass_erase)
 
 FLASH_BANK_COMMAND_HANDLER (kinetis_ke_flash_bank_command)
 
static int kinetis_ke_auto_probe (struct flash_bank *bank)
 
static int kinetis_ke_blank_check (struct flash_bank *bank)
 
static int kinetis_ke_erase (struct flash_bank *bank, unsigned int first, unsigned int last)
 
static int kinetis_ke_ftmrx_command (struct flash_bank *bank, uint8_t count, uint8_t *FCCOBIX, uint8_t *FCCOBHI, uint8_t *FCCOBLO, uint8_t *fstat)
 
static int kinetis_ke_info (struct flash_bank *bank, struct command_invocation *cmd)
 
static int kinetis_ke_mdm_poll_register (struct adiv5_dap *dap, unsigned int reg, uint32_t mask, uint32_t value)
 
static int kinetis_ke_mdm_read_register (struct adiv5_dap *dap, unsigned int reg, uint32_t *result)
 
static int kinetis_ke_mdm_write_register (struct adiv5_dap *dap, unsigned int reg, uint32_t value)
 
static int kinetis_ke_prepare_flash (struct flash_bank *bank)
 
static int kinetis_ke_probe (struct flash_bank *bank)
 
static int kinetis_ke_protect (struct flash_bank *bank, int set, unsigned int first, unsigned int last)
 
static int kinetis_ke_protect_check (struct flash_bank *bank)
 
static int kinetis_ke_stop_watchdog (struct target *target)
 
static int kinetis_ke_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
 
static int kinetis_ke_write_words (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t words)
 

Variables

static const struct command_registration kinetis_ke_command_handler []
 
static const struct command_registration kinetis_ke_exec_command_handlers []
 
const struct flash_driver kinetis_ke_flash
 
static uint8_t kinetis_ke_flash_write_code []
 
static const uint32_t kinetis_ke_known_mdm_ids []
 
static const struct command_registration kinetis_ke_security_command_handlers []
 

Macro Definition Documentation

◆ FTMRX_CMD_ALLERASED

#define FTMRX_CMD_ALLERASED   0x01

Definition at line 68 of file kinetis_ke.c.

◆ FTMRX_CMD_BLOCKERASED

#define FTMRX_CMD_BLOCKERASED   0x02

Definition at line 69 of file kinetis_ke.c.

◆ FTMRX_CMD_CONFIGNVM

#define FTMRX_CMD_CONFIGNVM   0x0F

Definition at line 81 of file kinetis_ke.c.

◆ FTMRX_CMD_ERASEALL

#define FTMRX_CMD_ERASEALL   0x08

Definition at line 74 of file kinetis_ke.c.

◆ FTMRX_CMD_ERASEBLOCK

#define FTMRX_CMD_ERASEBLOCK   0x09

Definition at line 75 of file kinetis_ke.c.

◆ FTMRX_CMD_ERASESECTOR

#define FTMRX_CMD_ERASESECTOR   0x0A

Definition at line 76 of file kinetis_ke.c.

◆ FTMRX_CMD_PROGFLASH

#define FTMRX_CMD_PROGFLASH   0x06

Definition at line 72 of file kinetis_ke.c.

◆ FTMRX_CMD_PROGONCE

#define FTMRX_CMD_PROGONCE   0x07

Definition at line 73 of file kinetis_ke.c.

◆ FTMRX_CMD_READONCE

#define FTMRX_CMD_READONCE   0x04

Definition at line 71 of file kinetis_ke.c.

◆ FTMRX_CMD_SECTIONERASED

#define FTMRX_CMD_SECTIONERASED   0x03

Definition at line 70 of file kinetis_ke.c.

◆ FTMRX_CMD_SETFACTORYLVL

#define FTMRX_CMD_SETFACTORYLVL   0x0E

Definition at line 80 of file kinetis_ke.c.

◆ FTMRX_CMD_SETMARGINLVL

#define FTMRX_CMD_SETMARGINLVL   0x0D

Definition at line 79 of file kinetis_ke.c.

◆ FTMRX_CMD_UNSECURE

#define FTMRX_CMD_UNSECURE   0x0B

Definition at line 77 of file kinetis_ke.c.

◆ FTMRX_CMD_VERIFYACCESS

#define FTMRX_CMD_VERIFYACCESS   0x0C

Definition at line 78 of file kinetis_ke.c.

◆ FTMRX_ERROR_ACCERR

#define FTMRX_ERROR_ACCERR   0x20

Definition at line 84 of file kinetis_ke.c.

◆ FTMRX_ERROR_FPVIOL

#define FTMRX_ERROR_FPVIOL   0x10

Definition at line 85 of file kinetis_ke.c.

◆ FTMRX_FCLKDIV_FDIV

#define FTMRX_FCLKDIV_FDIV (   x)    (((uint8_t)(((uint8_t)(x))<<FTMRX_FCLKDIV_FDIV_SHIFT))&FTMRX_FCLKDIV_FDIV_MASK)

Definition at line 58 of file kinetis_ke.c.

◆ FTMRX_FCLKDIV_FDIV_MASK

#define FTMRX_FCLKDIV_FDIV_MASK   0x3F

Definition at line 56 of file kinetis_ke.c.

◆ FTMRX_FCLKDIV_FDIV_SHIFT

#define FTMRX_FCLKDIV_FDIV_SHIFT   0

Definition at line 57 of file kinetis_ke.c.

◆ FTMRX_FCLKDIV_FDIVLCK_MASK

#define FTMRX_FCLKDIV_FDIVLCK_MASK   0x40

Definition at line 59 of file kinetis_ke.c.

◆ FTMRX_FCLKDIV_FDIVLCK_SHIFT

#define FTMRX_FCLKDIV_FDIVLCK_SHIFT   6

Definition at line 60 of file kinetis_ke.c.

◆ FTMRX_FCLKDIV_FDIVLD_MASK

#define FTMRX_FCLKDIV_FDIVLD_MASK   0x80

Definition at line 61 of file kinetis_ke.c.

◆ FTMRX_FCLKDIV_FDIVLD_SHIFT

#define FTMRX_FCLKDIV_FDIVLD_SHIFT   7

Definition at line 62 of file kinetis_ke.c.

◆ FTMRX_FSTAT_CCIF_MASK

#define FTMRX_FSTAT_CCIF_MASK   0x80

Definition at line 63 of file kinetis_ke.c.

◆ FTMRX_FSTAT_MGSTAT0_MASK

#define FTMRX_FSTAT_MGSTAT0_MASK   0x01

Definition at line 64 of file kinetis_ke.c.

◆ FTMRX_FSTAT_MGSTAT1_MASK

#define FTMRX_FSTAT_MGSTAT1_MASK   0x02

Definition at line 65 of file kinetis_ke.c.

◆ ICS_C1

#define ICS_C1   0x40064000

Definition at line 39 of file kinetis_ke.c.

◆ ICS_C2

#define ICS_C2   0x40064001

Definition at line 40 of file kinetis_ke.c.

◆ ICS_C2_BDIV

#define ICS_C2_BDIV (   x)    (((uint8_t)(((uint8_t)(x))<<ICS_C2_BDIV_SHIFT))&ICS_C2_BDIV_MASK)

Definition at line 52 of file kinetis_ke.c.

◆ ICS_C2_BDIV_MASK

#define ICS_C2_BDIV_MASK   0xE0

Definition at line 50 of file kinetis_ke.c.

◆ ICS_C2_BDIV_SHIFT

#define ICS_C2_BDIV_SHIFT   5

Definition at line 51 of file kinetis_ke.c.

◆ ICS_C3

#define ICS_C3   0x40064002

Definition at line 41 of file kinetis_ke.c.

◆ ICS_C4

#define ICS_C4   0x40064003

Definition at line 42 of file kinetis_ke.c.

◆ ICS_C4_SCFTRIM_MASK

#define ICS_C4_SCFTRIM_MASK   0x1

Definition at line 54 of file kinetis_ke.c.

◆ ICS_S

#define ICS_S   0x40064004

Definition at line 43 of file kinetis_ke.c.

◆ ICS_S_LOCK_MASK

#define ICS_S_LOCK_MASK   0x40

Definition at line 53 of file kinetis_ke.c.

◆ KINETIS_KE_SRSID_FAMID

#define KINETIS_KE_SRSID_FAMID (   x)    ((x >> 28) & 0x0F)

Definition at line 87 of file kinetis_ke.c.

◆ KINETIS_KE_SRSID_KEX2

#define KINETIS_KE_SRSID_KEX2   0x02

Definition at line 91 of file kinetis_ke.c.

◆ KINETIS_KE_SRSID_KEX4

#define KINETIS_KE_SRSID_KEX4   0x04

Definition at line 92 of file kinetis_ke.c.

◆ KINETIS_KE_SRSID_KEX6

#define KINETIS_KE_SRSID_KEX6   0x06

Definition at line 93 of file kinetis_ke.c.

◆ KINETIS_KE_SRSID_PINCOUNT

#define KINETIS_KE_SRSID_PINCOUNT (   x)    ((x >> 16) & 0x0F)

Definition at line 89 of file kinetis_ke.c.

◆ KINETIS_KE_SRSID_SUBFAMID

#define KINETIS_KE_SRSID_SUBFAMID (   x)    ((x >> 24) & 0x0F)

Definition at line 88 of file kinetis_ke.c.

◆ MDM_ACCESS_TIMEOUT

#define MDM_ACCESS_TIMEOUT   3000 /* iterations */

Definition at line 135 of file kinetis_ke.c.

◆ MDM_REG_CTRL

#define MDM_REG_CTRL   0x04

Definition at line 109 of file kinetis_ke.c.

◆ MDM_REG_ID

#define MDM_REG_ID   0xfc

Definition at line 110 of file kinetis_ke.c.

◆ MDM_REG_STAT

#define MDM_REG_STAT   0x00

Definition at line 108 of file kinetis_ke.c.

◆ MDM_STAT_BACKDOOREN

#define MDM_STAT_BACKDOOREN   (1<<6)

Definition at line 117 of file kinetis_ke.c.

◆ MDM_STAT_CORE_HALTED

#define MDM_STAT_CORE_HALTED   (1<<16)

Definition at line 122 of file kinetis_ke.c.

◆ MDM_STAT_CORE_SLEEPDEEP

#define MDM_STAT_CORE_SLEEPDEEP   (1<<17)

Definition at line 123 of file kinetis_ke.c.

◆ MDM_STAT_CORESLEEPING

#define MDM_STAT_CORESLEEPING   (1<<18)

Definition at line 124 of file kinetis_ke.c.

◆ MDM_STAT_FMEACK

#define MDM_STAT_FMEACK   (1<<0)

Definition at line 112 of file kinetis_ke.c.

◆ MDM_STAT_FMEEN

#define MDM_STAT_FMEEN   (1<<5)

Definition at line 116 of file kinetis_ke.c.

◆ MDM_STAT_FREADY

#define MDM_STAT_FREADY   (1<<1)

Definition at line 113 of file kinetis_ke.c.

◆ MDM_STAT_LLSMODEXIT

#define MDM_STAT_LLSMODEXIT   (1<<9)

Definition at line 120 of file kinetis_ke.c.

◆ MDM_STAT_LPEN

#define MDM_STAT_LPEN   (1<<7)

Definition at line 118 of file kinetis_ke.c.

◆ MDM_STAT_SYSRES

#define MDM_STAT_SYSRES   (1<<3)

Definition at line 115 of file kinetis_ke.c.

◆ MDM_STAT_SYSSEC

#define MDM_STAT_SYSSEC   (1<<2)

Definition at line 114 of file kinetis_ke.c.

◆ MDM_STAT_VLLSXMODEXIT

#define MDM_STAT_VLLSXMODEXIT   (1<<10)

Definition at line 121 of file kinetis_ke.c.

◆ MDM_STAT_VLPEN

#define MDM_STAT_VLPEN   (1<<8)

Definition at line 119 of file kinetis_ke.c.

◆ MEM_CTRL_CORE_HOLD_RES

#define MEM_CTRL_CORE_HOLD_RES   (1<<4)

Definition at line 130 of file kinetis_ke.c.

◆ MEM_CTRL_DBG_DIS

#define MEM_CTRL_DBG_DIS   (1<<1)

Definition at line 127 of file kinetis_ke.c.

◆ MEM_CTRL_DBG_REQ

#define MEM_CTRL_DBG_REQ   (1<<2)

Definition at line 128 of file kinetis_ke.c.

◆ MEM_CTRL_FMEIP

#define MEM_CTRL_FMEIP   (1<<0)

Definition at line 126 of file kinetis_ke.c.

◆ MEM_CTRL_SYS_RES_REQ

#define MEM_CTRL_SYS_RES_REQ   (1<<3)

Definition at line 129 of file kinetis_ke.c.

◆ MEM_CTRL_VLLSX_DBG_ACK

#define MEM_CTRL_VLLSX_DBG_ACK   (1<<6)

Definition at line 132 of file kinetis_ke.c.

◆ MEM_CTRL_VLLSX_DBG_REQ

#define MEM_CTRL_VLLSX_DBG_REQ   (1<<5)

Definition at line 131 of file kinetis_ke.c.

◆ MEM_CTRL_VLLSX_STAT_ACK

#define MEM_CTRL_VLLSX_STAT_ACK   (1<<7)

Definition at line 133 of file kinetis_ke.c.

◆ SIM_BUSDIV

#define SIM_BUSDIV   0x40048018

Definition at line 44 of file kinetis_ke.c.

◆ SIM_CLKDIV_KE04_16_20_24

#define SIM_CLKDIV_KE04_16_20_24   0x4004801C

Definition at line 47 of file kinetis_ke.c.

◆ SIM_CLKDIV_KE04_44_64_80

#define SIM_CLKDIV_KE04_44_64_80   0x40048024

Definition at line 46 of file kinetis_ke.c.

◆ SIM_CLKDIV_KE06

#define SIM_CLKDIV_KE06   0x40048024

Definition at line 45 of file kinetis_ke.c.

◆ SIM_CLKDIV_OUTDIV2_MASK

#define SIM_CLKDIV_OUTDIV2_MASK   0x1000000

Definition at line 55 of file kinetis_ke.c.

◆ SIM_SRSID

#define SIM_SRSID   0x40048000

Definition at line 38 of file kinetis_ke.c.

◆ WDOG_CS1

#define WDOG_CS1   0x40052000

Definition at line 48 of file kinetis_ke.c.

Function Documentation

◆ COMMAND_HANDLER() [1/3]

◆ COMMAND_HANDLER() [2/3]

COMMAND_HANDLER ( kinetis_ke_disable_wdog_handler  )

◆ COMMAND_HANDLER() [3/3]

◆ FLASH_BANK_COMMAND_HANDLER()

FLASH_BANK_COMMAND_HANDLER ( kinetis_ke_flash_bank_command  )

Definition at line 665 of file kinetis_ke.c.

References bank, CMD_ARGC, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, and LOG_INFO.

◆ kinetis_ke_auto_probe()

static int kinetis_ke_auto_probe ( struct flash_bank bank)
static

Definition at line 1133 of file kinetis_ke.c.

References bank, ERROR_OK, kinetis_ke_probe(), and kinetis_ke_flash_bank::sim_srsid.

◆ kinetis_ke_blank_check()

◆ kinetis_ke_erase()

static int kinetis_ke_erase ( struct flash_bank bank,
unsigned int  first,
unsigned int  last 
)
static

◆ kinetis_ke_ftmrx_command()

static int kinetis_ke_ftmrx_command ( struct flash_bank bank,
uint8_t  count,
uint8_t *  FCCOBIX,
uint8_t *  FCCOBHI,
uint8_t *  FCCOBLO,
uint8_t *  fstat 
)
static

◆ kinetis_ke_info()

static int kinetis_ke_info ( struct flash_bank bank,
struct command_invocation cmd 
)
static

Definition at line 1143 of file kinetis_ke.c.

References bank, cmd, command_print_sameline(), ERROR_OK, and TARGET_ADDR_FMT.

◆ kinetis_ke_mdm_poll_register()

static int kinetis_ke_mdm_poll_register ( struct adiv5_dap dap,
unsigned int  reg,
uint32_t  mask,
uint32_t  value 
)
static

◆ kinetis_ke_mdm_read_register()

static int kinetis_ke_mdm_read_register ( struct adiv5_dap dap,
unsigned int  reg,
uint32_t *  result 
)
static

◆ kinetis_ke_mdm_write_register()

static int kinetis_ke_mdm_write_register ( struct adiv5_dap dap,
unsigned int  reg,
uint32_t  value 
)
static

◆ kinetis_ke_prepare_flash()

◆ kinetis_ke_probe()

◆ kinetis_ke_protect()

static int kinetis_ke_protect ( struct flash_bank bank,
int  set,
unsigned int  first,
unsigned int  last 
)
static

◆ kinetis_ke_protect_check()

◆ kinetis_ke_stop_watchdog()

◆ kinetis_ke_write()

static int kinetis_ke_write ( struct flash_bank bank,
const uint8_t *  buffer,
uint32_t  offset,
uint32_t  count 
)
static

◆ kinetis_ke_write_words()

Variable Documentation

◆ kinetis_ke_command_handler

const struct command_registration kinetis_ke_command_handler[]
static
Initial value:
= {
{
.name = "kinetis_ke",
.mode = COMMAND_ANY,
.help = "Kinetis KE flash controller commands",
.usage = "",
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:253
@ COMMAND_ANY
Definition: command.h:42
static const struct command_registration kinetis_ke_exec_command_handlers[]
Definition: kinetis_ke.c:1228

Definition at line 1151 of file kinetis_ke.c.

◆ kinetis_ke_exec_command_handlers

const struct command_registration kinetis_ke_exec_command_handlers[]
static
Initial value:
= {
{
.name = "mdm",
.mode = COMMAND_ANY,
.help = "MDM-AP command group",
.usage = "",
},
{
.name = "disable_wdog",
.mode = COMMAND_EXEC,
.help = "Disable the watchdog timer",
.usage = "",
.handler = kinetis_ke_disable_wdog_handler,
},
}
@ COMMAND_EXEC
Definition: command.h:40
static const struct command_registration kinetis_ke_security_command_handlers[]
Definition: kinetis_ke.c:1210
const char * name
Definition: command.h:235

Definition at line 1151 of file kinetis_ke.c.

◆ kinetis_ke_flash

const struct flash_driver kinetis_ke_flash
Initial value:
= {
.name = "kinetis_ke",
.flash_bank_command = kinetis_ke_flash_bank_command,
.erase = kinetis_ke_erase,
.protect = kinetis_ke_protect,
.write = kinetis_ke_write,
.probe = kinetis_ke_probe,
.auto_probe = kinetis_ke_auto_probe,
.erase_check = kinetis_ke_blank_check,
.protect_check = kinetis_ke_protect_check,
.info = kinetis_ke_info,
.free_driver_priv = default_flash_free_driver_priv,
}
int default_flash_read(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
Provides default read implementation for flash memory.
void default_flash_free_driver_priv(struct flash_bank *bank)
Deallocates bank->driver_priv.
static int kinetis_ke_protect(struct flash_bank *bank, int set, unsigned int first, unsigned int last)
Definition: kinetis_ke.c:771
static int kinetis_ke_erase(struct flash_bank *bank, unsigned int first, unsigned int last)
Definition: kinetis_ke.c:939
static int kinetis_ke_auto_probe(struct flash_bank *bank)
Definition: kinetis_ke.c:1133
static int kinetis_ke_blank_check(struct flash_bank *bank)
Definition: kinetis_ke.c:1151
static int kinetis_ke_protect_check(struct flash_bank *bank)
Definition: kinetis_ke.c:785
static const struct command_registration kinetis_ke_command_handler[]
Definition: kinetis_ke.c:1246
static int kinetis_ke_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
Definition: kinetis_ke.c:986
static int kinetis_ke_probe(struct flash_bank *bank)
Definition: kinetis_ke.c:1038
static int kinetis_ke_info(struct flash_bank *bank, struct command_invocation *cmd)
Definition: kinetis_ke.c:1143

Definition at line 1151 of file kinetis_ke.c.

◆ kinetis_ke_flash_write_code

uint8_t kinetis_ke_flash_write_code[]
static
Initial value:
= {
}

Definition at line 684 of file kinetis_ke.c.

Referenced by kinetis_ke_write_words().

◆ kinetis_ke_known_mdm_ids

const uint32_t kinetis_ke_known_mdm_ids[]
static
Initial value:
= {
0x001C0020,
}

Definition at line 571 of file kinetis_ke.c.

Referenced by COMMAND_HANDLER().

◆ kinetis_ke_security_command_handlers

const struct command_registration kinetis_ke_security_command_handlers[]
static
Initial value:
= {
{
.name = "check_security",
.mode = COMMAND_EXEC,
.help = "Check status of device security lock",
.usage = "",
.handler = kinetis_ke_check_flash_security_status,
},
{
.name = "mass_erase",
.mode = COMMAND_EXEC,
.help = "Issue a complete flash erase via the MDM-AP",
.usage = "",
.handler = kinetis_ke_mdm_mass_erase,
},
}

Definition at line 1151 of file kinetis_ke.c.