186
November, 2018 Rev.1.4
Mode Exit
9) Mode Exit
9) Mode Exit
9) Mode Exit
Table 15-2 Program or Erase sequence in ISP or Self Program Mode
15.6.1.1 FLASH Read
Step 1. Enter OCD(=ISP) mode.
Step 2. Set ENBDM bit of BCR.
Step 3. Enable debug and Request debug mode.
Step 4. Read data from Flash.
15.6.1.2 Enable ISP or Self Programming Mode
Step 1. Enter OCD(=ISP) mode.
NOTE 1
Step 2. Set ENBDM bit of BCR.
Step 3. Enable debug and Request debug mode.
Step 3. Enter program/erase mode sequence.
NOTE 2
(1) Write AA
H
to F555
H
(2) Write 55
H
to FAAA
H
(3) Write A5
H
to F555
H
NOTE 1
. Refer to chapter 14
NOTE 2
. Command sequence to activate FLASH program/erase mode. It is composed of sequential write to fixed
FLASH addresses.
15.6.2 Example of FLASH control in C language
The next example code shows how to program or erase a specific page area of FLASH using C
language. The program or erase sequence used in the test code complies with above rules. In this
example code, the page address F000
H
is erased and programmed.
Example:
//////////////////////////////////////////////////////////
// Project : Write data to EEPROM at 0xF000
// Device : MC96FR364B
// Oscillator : 4MHz
// Compiler : Keil uvision C Compiler V7.20
/////////////////////////////////////////////////////////
#include <intrins.h>
#include "MC96FR364B.h"
#define FLASH_PBUFF_SIZE 64
Содержание MC96FR364B
Страница 17: ...MC96FR364B November 2018 Rev 1 4 17 4 PACKAGE DIMENSION...
Страница 18: ...MC96FR364B 18 November 2018 Rev 1 4 Figure 4 1 PKG DIMENSION 28 TSSOP...
Страница 23: ...MC96FR364B November 2018 Rev 1 4 23 6 3 REMOUT Port Data PAD VDD Figure 6 3 REMOUT port...
Страница 69: ...November 2018 Rev 1 4 69 Initial value 00H BIT 7 0 BIT counter value...