SyncMOS ISP Writer SWR0002B 使用手册

SyncMOS ISP Writer SWR0002B
使用手册
SyncMOS ISP Writer SWR0002B 使用手册
1 前言:
1.1 SyncMOS ISP Writer 为支持 External ISP,使用者将程序烧录至新茂 SM59DXX 系列及
SM59RXX 系列,使用者不需要额外烧录 ISP Service CODE 于 Target IC 上,即可将所要
烧录的程序烧录于 SM59DXX 系列或 SM59RXX 系列中,也可支持 SM59DXX 系列 Internal
ISP 功能。
1.2 可支持之传输接口:USB、RS232。
1.3 可支持 MCU 之烧录电压:5V、3.3V(由 ISP Writer Jump J8 选择)。
1.4 可烧录之 MCU:SM59DXX 系列及 SM59RXX 系列(由 ISP Writer Jump J1,J2,J3 选择)。
1.5 SyncMOS ISP Writer 可透过 USB 传输线供电,使用者不需额外提供 DC 5V 电源。
1.6 SM59RXX 系列需使用 64 Pin TQFP to 40 pin DIP 转接座【型号为 SAB0001A,转接座请
参阅第 7 点 SM59RXX 系列转接座(SAB0001A)说明】。
2 ISP Writer 相关配件说明:
2.1 ISP Writer 主板:型号 SWR0002B-0。
2.2 USB 传输线:型号 SAC1004A-0。
2.3 64 Pin TQFP to 40 pin DIP 转接座(选配):型号 SAB0001A-0,使用者使用 SM59RXX 系
列时才需选用此转接座。
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
1
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
3 ISP Writer 外观图:
4 ISP Writer 硬件设定:
4.1 先接上 ISP Writer 所使用的电源为直流 5V【DC 接头为内正(+)外负(-)】, 也可直接使用
USB 电源供电,则 power switch 切换至 USB POWER 处,如图所示。
直接使用 USB 供电时
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
2
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
4.2 调整所要烧录 MCU 之 VCC 的电压(ISP Writer 主板上之 JUMP J8),例如:
SM59DXX 系列 C25 或 SM59RXX 系列 C25
C 表示工作电压 5V
SM59DXX 系列 L25 或 SM59RXX 系列 L25
L 表示工作电压 3.3V
待烧录 MCU 之 VCC 的电压选择
4.3 当您要烧录 SM59DXX 系列,您的 ISP Writer 的 J1,J2,J3 需要调整成下图所示:
烧录 SM59DXX 系列之 J1,J2,J3 设定
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
3
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
4.4 当您要烧录 SM59RXX 系列时,ISP Writer 的 J1,J2,J3 需要调整成如图所示:由于烧录
SM59RXX 系列为 64 pin TQFP 包装,所以烧录时需透过 64 Pin TQFP to 40 pin DIP 转接
座【型号为 SAB0001A,转接座请参阅第 7 点 SM59RXX 系列转接座(SAB0001A)说
明】。
烧录 SM59RXX 系列之 J1,J2,J3 设定
4.5 选择您与 PC 的传输接口:当使用 COM PORT 接口时,并将 DC 5V 电源接上,打开电源开
关,则电源指示灯会亮起;当使用 USB 接口时,则 USB 电源指示灯也会亮起,表示 USB
供电正常。
当电源打开时,电源指示灯亮起
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
4
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
5 SyncMOS EWAP V2.3 操作说明:
5.1 首先将 SyncMOS EWAP(Eng)V2.3.1.1050 Setup.exe 安装于您的计算机,安装完成之后在
您的桌面会产生一个快捷方式。
5.2 点选 EWAP_V2.3 两下,即开启 EWAP 画面。
EWAP V2.3 画面
5.3 当开启 EWAP 画面之后,操作顺序如下:
5.3.1 Select Program Method:
a. 选择你要烧录的 IC 于 Chip 中选取(SM59DXX 系列或 SM59RXX 系列),并设定联机
烧录(On-line Record)、离线烧录(Off-line Record)或联机更新(On-line Update)。
(1) 联机烧录(On-line Record):需连接 PC 使用 EWAP 烧录。
(2) 离线烧录(Off-line Record):可将待烧录的 code 传到 Writer 中,便可不须联机计算
机进行烧录。
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
5
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
(3) 联机更新(On-line Update):模仿 ICE 功能,提供使用者在撰写程序时较方便进行
Debug。在重新 Compile 后,只要重新开关 Target board 电源,即可透过 UART 传输侦
测 Target board 有无联机便可直接更新。(仅支持 SM59DXX 系列 IC,此外 Firmware
必须更新至 Free Run 版本才可支持联机更新功能)
b. 选择 Internal ISP(IC 内必须已有烧录 ISP code 才可使用,路径为 C:\Program
Files\SyncMOS\SyncMOS Writers\EWAP\ISP\ISP04GB_EWAP.hex)或 External
ISP。(SM59RXX 系列仅支持 External ISP,On-line Update 模式仅支持 SM59D04
Internal ISP 在 MCU on Target Board 模式)
c. 当使用 Internal ISP 时,需设定震荡频率,默认值为 22.1184MHz/12T(使用 External
ISP 时不需选择)。
d. 选择 MCU on Socket 或 MCU on Target Board(使用 Off-line Record 时不需选择)。
e. 完整 Select Program Method 操作流程图如下图所示:
5.3.2 Scan COM Port:
a. 选择所连接的 COM PORT(COM1 或 COM2),按【Scan】,会自动连结 ISP WRITER
与 PC 之间的 COM PORT。(如果使用离线烧录,则只需选择好所连接的 COM
PORT,不需执行 Scan 的动作)
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
6
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
b. 当找到 COM PORT 并连接成功时 Message 窗口会显示【COM2 Connect
Success!】,且软件接口会显示绿灯,表示连结成功(依使用者计算机 COM1 或 COM2
而不同)。
c. 如果使用 USB 联机,开启 EWAP 时 SCAN COM port 选项会出现 COM4(Prolific
USB-to-Serial Comm Port),直接按【Scan】即可联机成功。
d. 当搜寻不到您的 COM Port 时,则 Message 窗口会显示【Please check COM port.】。
此时表示您的 USB 不在 COM1~COM32 之间?或 External ISP Writer 电源未上电?
请更改您的 COM Port 于 COM1~COM32,并检查 ISP WRITER 电源灯是否有亮。
相关如何设定 COM Port,请参照第 6 点如何修改 COM Port 位置。
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
7
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
5.3.3 Select Program File:
a. 点按【Select】,会跳出 Load 窗口,按【Open】选择您要烧录的档案(XXX.HEX or
XXX.BIN)。
b. SM59DXX 系列最大只能加载 16K 的 ROM SIZE(SM59D04G2),SM59RXX 系列
最大只能加载 64K ROM SIZE(SM59R16A2),当您所载入的 CODE SIZE 大于其
限制时,将会跳出 Over the MCU program memory size 的对话框。
c. 当如果使用 SM59DXX 系列需同时加载 main code 与 ISP service code 时,可以同
时在 Code 与 ISP 各别加载。
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
8
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
d. AutoUpdate:当未勾选此选项而执行烧录动作时,若已加载的 source code 有被改
变,会跳出通知窗口,询问你是否重新 reload 档案,如下图所示。当勾选此选项而
执行烧录动作时,若已加载的 source code 有被改变,则会自动修改 Buffer 内的 code
而不会跳出询问窗口。
5.3.4 Configuration:选择您要设定的项目,此功能仅可在 External ISP 时做选择。
a. ISP Block(N):用来设定 ISP 程序保护区块的大小。(此功能仅可在 SM59DXX 系列
使用)
b. Watch Dog:选择看门狗功能(watch dog)中 WDTM 的参数值。(此功能可在
SM59DXX 系列与 SM59RXX 系列使用)
c. MCU speed:使用 SM59DXX 系列时,可选择 6T 模式或是 12T 模式。使用 SM59RXX
系列时,可以选择使用内部频率或使用外挂频率。
d. BOR:即是低压复位(Brown Out Reset),当 Vcc 电压过低时可以自动 Reset。(此功
能仅可在 SM59DXX 系列使用)
5.3.5 Record:
a. 【Chip Erase】:当点按 Chip Erase 时,会清除 Target IC 的所有数据。
b. 【Blank Check】:当点按 Blank Check 时,会检查 Target IC 的资料是否为 FF。
c. 【Program】:当点按 Program 时,会将您加载的烧录档案与所设定的功能烧录到
Target IC 里。
d. 【Verify】:当点按 Verify 时,将确认您所载入的烧录档案与烧录到 IC 的数据是否正
确。
e. 【Protect】:当点按 Protect 时,将 Target IC 的数据加密,使其无法使用 READ 读
出正确的数据。(SM59DXX 系列 Protect 之后读出来数据全部为 00,SM59RXX 系
列 Protect 之后读出来数据全部为 FF)
f. 【MCU Reset】:当使用 Internal ISP 时,烧录完成后让 IC 内部自行 Reset。
g. 【Include Scan】:当此选项打勾执行 Autorun 时,会自动重新 Scan Comport。
h. 【Autorun】:点选您要执行的项目,如 Chip Erase、Program……等。点按 Autorun
则会执行刚刚所选择的项目,当烧录完成后会在 Message 窗口出现【Autorun
Success!】的讯息。
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
9
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
5.3.6 Buffer Data:
a. 【Read MCU】:当点按【Read MCU】功能时,会将读出来的值显示于 Buffer Data
窗口中
b. 【Save Buffer】:可将 Buffer 中的资料另存 bin 文件。
c. 【Clear Window】:将 Buffer 中的资料清除。
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
10
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
6 如何修改 Com Port 位置:
6.1 于桌面点选【我的计算机】,在按鼠标右键选择【内容】则出现如图所示画面。
6.2 点选【硬件】,选择【装置管理员】,则出现以下画面:
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
11
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
6.3 选择【连接埠(COM 和 LPT)】点选要更改的 COM PORT,在按鼠标右键选择【内容】,则
出现以下画面:
6.4 点选【进阶】则出现以下画面:
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
12
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
6.5 选择你要设定的 COM PORT,COM1~COM32 之间,然后按确定即可。此时再点选【硬件变
更扫描】,就会变成您所设定的 COM PORT:
7 SM59RXX 系列转接座(型号:SAB0001A-0):
SAB0001A-0 为 64 TQFP to 40 DIP 转接座,此为 SM59RXX 系列使用,此转接座可用于 ISP
Writer 或是 SyncMOS Easy Writer(型号:SWR0001A-0),外观如图所示:
俯视图
正视图
侧视图
烧录时,SM59RXX 系列放置位置
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
13
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
7.1 SAB0001A-0 JUMP 如何设定:
7.1.1 SAB0001A-0 转接板上有 JUMP J3、J4、J5、J6。
7.1.2 JUMP J6 为选择 SM59RXX 系列的 VCC 电压。
7.1.3 当选择此转接板是使用在 ISP Writer(型号:SWR0002A-0)时,需将 JUMP J3、J4、
J5 选择到 ISP MODE,如下图所示
ISP MODE 时的设定
7.1.4 当选择此转接板是使用在 Easy Writer(型号:SWR0001A-0)时,需将 JUMP J3、J4、
J5 选择到 Writer MODE,如下图所示。
Writer MODE 时的设定
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
14
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
7.1.5 当要烧录时,JUMP J6 VCC 电压设定需要与 ISP Writer 上 JUMP J8 之 VCC 的电压设
定相同,否则将无法烧录。也就是说 ISP Writer JUMP J8 电压如果选择 5V,则
SAB0001A-0 转接板 JUMP J6 电压也需要选择 5V。
7.2 SAB0001A 如何放置于 ISP Writer 上,如图所示:
SAB0001 放置于 ISP Writer 上示意图
8 离线烧录(Off-line Record)教学:
8.1 设定好所需的项目,点选 Execute,ISP Writer 便会将所需烧录的 code 存至 ISP Writer 中
的 MCU 中,执行过程中 LED D2、D4、D6、D8 会不断闪烁,当执行成功后,LED 灯会熄
灭,且 Message 窗口会显示【Off-line Success!】。
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
15
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
8.2 拔掉 Com Port 线,按 SW1 按钮,便可使用离线烧录的功能,烧录过程中橘灯 LED D1~D4
会不断闪烁,当 D1~D4 熄灭且绿灯 LED D5~D8 全亮时,即代表离线烧录作业完成。
8.3 计数烧录功能:off-line 烧录还可以设定计数功能,勾选 Counter 选项即可设定烧录次数,
请输入一个 1 到 100000 之间的整数,执行 Execute,ISP Writer 便会将所需烧录的 code
存至 ISP Writer 中的 MCU 中。每烧录成功一颗 IC,Remain 便会减少一次,可使用【Read】
键读出所剩余的可烧录次数,此外,离线烧录完成时按板子上的 Reset 键,当烧录次数每使
用总次数的八分之一时,LED D8~D1 就会熄灭一个灯,当所有 LED 接熄灭时,即代表烧录
次数使用完毕,必须重新加载 code 才能再使用离线烧录功能。
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
16
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
9 Target Board 连接教学:
9.1 SM59DXX 系列 Internal ISP for MCU on Target Board:
9.1.1 当使用 Internal ISP 连 Target Board 时,ISP Writer 需透过 Rx、Tx 与 Target Board 联
机,请将 Target Board 的 Rx、Tx 与 GND 连接至 ISP Writer 的 J14。(VCC 可使用 Target
Board 上的独立电源,若 Target Board 无独立电源时,可由 J14 第 1 支 pin 脚 VCC_OUT
提供)
9.1.2 再将 Target Board 上的 P2.6、P2.7 接 GND,然后按下 Reset,Target Board 上的 MCU
会进入 ISP Mode,此时便可使用 EWAP 软件接口做联机烧录或使用 ISP Writer 上的
SW1 按钮做离线烧录。
9.2 SM59DXX 系列 External ISP for MCU on Target Board:
9.2.1 当使用 External ISP 连 Target Board 时,ISP Writer 需透过 Data(连 P1.2)、Trigger(连
P1.1)、Clock(连 P1.0)与 Target Board 联机。请将 Target Board 的 P1.0、P1.1、P1.2
与 GND 连接至 ISP Writer 的 J4。(VCC 可使用 Target Board 上的独立电源,若 Target
Board 无独立电源时,可由 J4 第 1 支 pin 脚 VCC_OUT 提供)
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
17
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
9.2.2 请按 ISP Writer 上的 SW6,此时 LED D1~D8 会不停闪烁,然后再按 EWAP 窗口上的
【ISP Connect】,会跳出讯息窗口。
9.2.3 请按 Target Board 上的 Reset 键,再按讯息窗口中的【确定】键,即可进入 External ISP
联机,此时便可使用 EWAP 软件接口做联机烧录。
(当使用 SM59RXX 系列时软件接口
无 ISP Connect 键,直接按 ISP Writer 上的 SW6 后再按 Target Board 上的 Reset 键即
可进入 ISP Mode)
9.2.4 若要使用离线烧录,请先按 ISP Writer 上的 SW6,再按 Target Board 上的 Reset 键,
此时 Target Board 上的 MCU 会进入 ISP Mode,再按 ISP Writer 上的 SW1,便开始执
行烧录动作。
9.3 SM59RXX 系列 External ISP for MCU on Target Board:
9.3.1 当使用 External ISP 连 Target Board 时,ISP Writer 需透过 Trigger 连
ICE_ISP_TRIGOUT(IC 第 58pin)、Data 连 ICE_ISP_DATA(IC 第 59pin)、Clock 连
ICE_ISP_CLOCK (IC 第 60n)与 Target Board 联机。请将 Target Board 上 IC 的第 58、
59、60pin 与 GND 连接至 ISP Writer 的 J4。(VCC 可使用 Target Board 上的独立电源,
若 Target Board 无独立电源时,可由 J4 第 1 支 pin 脚 VCC_OUT 提供)
9.3.2 确认接线正确后,设定好 EWAP 软件接口,即可进行烧录作业
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
18
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
10 联机更新(On-line Update)教学:
10.1 使用 On- line Update 连 Target Board 前,SWR0002B 必须使用 Free Run 版本 Firmware
(C:\Program Files\SyncMOS\SyncMOS Writers\EWAP\FW\MSM9055 V24-FR.hex),
Target Board 上的 SM59DXX IC 也要有 ISP code,EWAP 内附的 ISP04GB_EWAP.hex 才
可支持 On- line Update,若客户使用之 ISP code 为旧版,请更新 ISP code 并把 Watch dog
功能 Enable 才可支持 On- line Update。(若 Watch dog 功能未 Enable,做完 on-line update
会影响 MCU reset 无作用)
10.2 同时 main code 也必须加入 GotoISP 与 UART 中断子程序
main.c
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
19
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
SynMOS_UART.c(UART 中断子程序)
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
20
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
SyncMOS_GoToISP.c(若需修改系统晶振,请修改 SyncMOS_GoToISP.c 内的 TH1 数值)
10.3 范例中使用的系统晶振为 11.0592MHz,12T。若需修改晶振,请修改 SyncMOS_GoToISP.c
内的 TH1 数值,请参照各频率与 TH1 设定值对照表。
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
21
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
Crystal
3.579MHz
4MHz
6MHz
8MHz
8.192MHz
11.0592MHz
12MHz
14.31818MHz
16MHz
20MHz
22.1184MHz
24MHz
24.576MHz
25MHz
Clock/Machine Cycle
12T
6T
12T
6T
12T
6T
12T
6T
12T
6T
12T
6T
12T
6T
12T
6T
12T
6T
12T
6T
12T
6T
12T
6T
12T
6T
12T
Baud rate(BPS)
19200
38400
7200
14400
2400
4800
14400
28800
14400
28800
57600
57600
4800
9600
38400
38400
28800
57600
9600
19200
57600
57600
9600
19200
14400
28800
14400
6T
TH1
FF
FF
FD
FD
F3
F3
FD
FD
FD
FD
FF
FE
F3
F3
FE
FC
FD
FD
F5
F5
FE
FC
F3
F3
F7
F7
F7
28800 F7
各频率与 TH1 设定值对照表
10.4 当使用 On-line Update 连 Target Board 时,联机 Target Board 方式如同 SM59DXX 系列
Internal ISP for MCU on Target Board 连接方式连接 Rx,Tx,GND。
10.5 设定好 EWAP 所需设定的项目,直接点选 Autorun,执行过程中 LED D1~D4 会不断闪烁,
代表 ISP Writer 正透过 UART 不断传 command,等待 Target Board 上电。
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
22
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
10.6 当 Target Board 上电后即立刻进行烧录,成功后会显示 Autorun Success!即代表烧录完成。
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
23
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
11 Update EWAP Firmware:
11.1 连接好 ISP Writer,开启 SyncMOS EWAP V2.3, Scan COM Port 的设定必须为正确的联接
串口,确保 Scan Com Port 成功。
11.2 先按住 ISP Writer 板子上的 SW1 按键不放,再按住 SW2(RESET)按键不放,接着先放开
SW2(RESET)按键,再放开 SW1 按键,确定 8 个 LED 灯都灭掉,如此 SM59264 才会进入
Internal ISP 模式。
11.3 从 EWAP 选取 Firmware -> Update,会跳出讯息窗口显示「This process will change
firmware.」
11.4 按「确定」选取 C:\Program Files\SyncMOS\SyncMOS Writers\EWAP\FW\MSM9055
V24.hex 档案或 MSM9055 V24-FR.hex(Free Run 版本支持 On-line Update 模式专用)。
11.5 如果成功 Update firmware 会显示 Autorun Success!,即代表更新完毕。
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
24
Ver. C 2008/09
SyncMOS ISP Writer SWR0002B
使用手册
12 烧录注意事项:
11.1 当点按 Scan COM Port 之后,无法找到与 PC 连接之 COM PORT 时,请将 ISP Writer 重
新 RESET 之后,再 Scan COM Port。
11.2 当每次 CHIP ERASE,皆无法执行,请检查
ISP Writer 电源开关是否打开?
COM Port 或 USB Port 是否已经连接上?
CHIP SELECT JUMP 选择是否正确?
VCC 电压选择是否正确?
重新 RESET 看看是否改善?
Specifications subject to change without notice, contact your sales representatives for the most recent information.
IRFSX-0016
25
Ver. C 2008/09