7 #ifndef OPENOCD_FLASH_NOR_MSP432_H
8 #define OPENOCD_FLASH_NOR_MSP432_H
11 #define MSP432_NO_FAMILY 0
16 #define MSP432_NO_TYPE 0
17 #define MSP432P401X_DEPR 1
20 #define MSP432P401X_GUESS 4
21 #define MSP432P411X_GUESS 5
24 #define MSP432E4X_GUESS 8
27 #define FLASH_BASE 0x00000000
30 #define P4_FLASH_MAIN_BASE FLASH_BASE
31 #define P4_FLASH_INFO_BASE 0x00200000
32 #define P4_SECTOR_LENGTH 0x1000
33 #define P4_ALGO_ENTRY_ADDR 0x01000110
36 #define E4_FLASH_BASE FLASH_BASE
37 #define E4_FLASH_SIZE 0x100000
38 #define E4_SECTOR_LENGTH 0x4000
39 #define E4_ALGO_ENTRY_ADDR 0x20000110
42 #define ALGO_BASE_ADDR 0x20000000
43 #define ALGO_BUFFER1_ADDR 0x20002000
44 #define ALGO_BUFFER2_ADDR 0x20003000
45 #define ALGO_PARAMS_BASE_ADDR 0x20000150
46 #define ALGO_FLASH_COMMAND_ADDR 0x20000150
47 #define ALGO_RETURN_CODE_ADDR 0x20000154
48 #define ALGO_FLASH_DEST_ADDR 0x2000015c
49 #define ALGO_FLASH_LENGTH_ADDR 0x20000160
50 #define ALGO_BUFFER1_STATUS_ADDR 0x20000164
51 #define ALGO_BUFFER2_STATUS_ADDR 0x20000168
52 #define ALGO_ERASE_PARAM_ADDR 0x2000016c
53 #define ALGO_UNLOCK_BSL_ADDR 0x20000170
54 #define ALGO_STACK_POINTER_ADDR 0x20002000
57 #define ALGO_BUFFER_SIZE 0x1000
58 #define ALGO_WORKING_SIZE (ALGO_BUFFER2_ADDR + 0x1000 - ALGO_BASE_ADDR)
61 #define FLASH_NO_COMMAND 0
62 #define FLASH_MASS_ERASE 1
63 #define FLASH_SECTOR_ERASE 2
64 #define FLASH_PROGRAM 4
67 #define FLASH_CONTINUOUS 32
70 #define FLASH_BUSY 0x00000001
71 #define FLASH_SUCCESS 0x00000ACE
72 #define FLASH_ERROR 0x0000DEAD
73 #define FLASH_TIMEOUT_ERROR 0xDEAD0000
74 #define FLASH_VERIFY_ERROR 0xDEADDEAD
75 #define FLASH_WRONG_COMMAND 0x00000BAD
76 #define FLASH_POWER_ERROR 0x00DEAD00
79 #define BUFFER_INACTIVE 0x00
80 #define BUFFER_ACTIVE 0x01
81 #define BUFFER_DATA_READY 0x10
84 #define FLASH_ERASE_MAIN 0x01
85 #define FLASH_ERASE_INFO 0x02
88 #define FLASH_LOCK_BSL 0x00
89 #define FLASH_UNLOCK_BSL 0x0b
uint8_t buffer2_status[4]
uint8_t buffer1_status[4]