TMPM4G9  V1.0.0.0
Flash_Write.h
Go to the documentation of this file.
1 
13 #ifdef __cplusplus
14  extern "C" {
15 #endif
16 
17 #include "stdio.h"
18 
19 #include "system_TMPM4Gx.h"
20 #include "TMPM4Gx.h"
21 
22 #include "txz_uart.h"
23 #include "txz_t32a.h"
24 
25 
26 /*------------------------------------------------------------------------------*/
27 /* Function Definitions */
28 /*------------------------------------------------------------------------------*/
29 extern void Get_RDY_Status(void);
30 extern void Get_BSY_Status(void);
31 extern void SendData(uint8_t *pData, uint32_t nLen);
32 extern uint32_t RecvData(uint8_t *pData, uint32_t nLen);
33 extern void Select_AREA0(void);
34 extern void Deselect_AREA0(void);
35 
36 
37 /*------------------------------------------------------------------------------*/
38 /* Variable Definitions */
39 /*------------------------------------------------------------------------------*/
40 #if 0
41 /* Described in Flash_Write.c. */
42 extern volatile uint32_t *prt_FLASH_SEQ_1st;
43 extern volatile uint32_t *prt_FLASH_SEQ_2nd;
44 #endif
45 
46 /*------------------------------------------------------------------------------*/
47 /* Configuration */
48 /*------------------------------------------------------------------------------*/
49 #define DATA_LEN (1 + 2 + 128 + 2) /* Number of bytes per block in application transfer. */
50 
51 /* XMODEM/CRC control code. */
52 #define SOH 0x01 /* Header of received data. : HOST¨TARGET */
53 #define ACK 0x06 /* Acknowledgment.(Transmission request / Reception complete) : TARGET¨HOST */
54 #define NAK 0x15 /* Request for retransmission. : TARGET¨HOST */
55 #define EOT 0x04 /* Transfer end. : HOST¨TARGET */
56 
57 #define WRITE_BG_ADDR (0x00002000UL) /* Write to FLASH from PG2 (address 0x00002000). */
58 #define WRITE_SIZE 128 /* Write size.(Adopted 128-bytes of XMODEM/CRC standard.) */
59 
60 #define FLASH_CMD_A0 0xA0
61 
62 
67 #ifdef __cplusplus
68 }
69 #endif /* __cplusplus */
70 /* The End Of Flash_Erase.h file. */
volatile uint32_t * prt_FLASH_SEQ_2nd
Definition: Flash_Erase.c:63
void Select_AREA0(void)
AREA-0 selection.
Definition: Flash_Erase.c:416
void Deselect_AREA0(void)
AREA-0 release.
Definition: Flash_Erase.c:436
void Get_BSY_Status(void)
Get Flash Status "Busy".
Definition: Flash_Erase.c:396
CMSIS Cortex-M4 Core Peripheral Access Layer Header File for the TOSHIBA 'TMPM4Gx' Group...
uint32_t RecvData(uint8_t *pData, uint32_t nLen)
Definition: com_control.c:351
CMSIS Cortex-M4 Device Peripheral Access Layer Header File for the TOSHIBA 'TMPM4Gx' Device Series...
void SendData(uint8_t *pData, uint32_t nLen)
Definition: com_control.c:316
This file provides all the functions prototypes for T32A driver.
void Get_RDY_Status(void)
Get Flash Status "Ready".
Definition: Flash_Erase.c:376
volatile uint32_t * prt_FLASH_SEQ_1st
Definition: Flash_Erase.c:62
This file provides all the functions prototypes for UART driver.