原创 初识AT91SAM7S64芯片

2009-11-2 22:20 6161 10 10 分类: MCU/ 嵌入式

第一次使用AT91SAM7S系列的芯片,直接用Jlink去写,发现写不进去,


后来网友告诉说是TST信号错了,后来就仔细查了这个系列的芯片boot相关的信息,作了一个全面的了解,顺便在这里作下笔记。


转载请注明出处:青藤门客播报站


SAM-BA 全称: SAM - Boot Assistant (SAM-BA?)


系统恢复程序(System Recovery Procedure)
1,目标板下电,
2,重新对目标板上电之前请确保TST,PA0/PGMEN0,PA1/PGMEN1,
PA2/PGMEN2 信号已经置位(参见上面的表格),由于PA0/PGMEN0,
PA1/PGMEN1,PA2/PGMEN2 内置上拉电阻,且复位后上拉电阻使能,而TST
复位后为下拉电阻使能,故只要将TST 信号上拉即可,对于AT91SAM7S-EK,
短接JP5 即可,
译者注:步骤2 假设TST,PA0-2 均未接外部上拉或者下拉电阻,如果有接
则请自行保证信号的电平符合上表,
3,目标板上电,并请等待10 秒钟,
4,下电,将TST 信号悬空,对于AT91SAM7S-EK 拔掉JP5 短路帽即可,
5,上电,此时目标板上的SAM-BA Boot 应用程序已经运行于FLASH 并等
待来自于USB 或者DBGU 的主连接(PC)


英文原文






  • AT91SAM7S Series



INFORMATION:
The following table gives you ROMed boot-up applications according to the pin setting after a power-up or a reset.


Pin Name
Level

Level

Default State after reset
TST
1

1

Pull-down
PA0/PGMEN0
1

1

Pull-up
PA1/PGMEN1
1

1

Pull-up
PA2/PGMEN2
0

1

Pull-up



Boot up Application ->
FFPI

SAM-BA
Boot
 

Other pin setting about TST, PA[0,1,2]/PGMEN|0,1,2] are reserved.



SYSTEM RECOVERY PROCEDURE:




  1. Shut down the board,



  2. Before to power up the board, the TST, PA0/PGMEN0, PA1/PGMEN1, and PA2/PGMEN2 signals must be set (see the table on the left which gives you an overview about these pins). On the AT91SAM7S-EK evaluation board, put only the JP5 jumper to set the TST signal (by default, others signal are set thanks to the embedded pull-up resistors).



  3. Power up the board and wait 10 secondes,



  4. Shut down the board and remove the JP5 jumper,



  5. Power up the board: The board is now working with the SAM-BA Boot application from the flash and waiting connection through USB port.



IMPORTANT: THIS SYSTEM RECOVERY PROCEDURE CANNOT BE EXECUTED IF THE FLASH SECURITY BIT IS SET.


INFORMATION: What has the Recovery Procedure Performed ?


The recovery procedure has:
- Forced the AT91SAM7S to boot from its internal ROM (first power up with TST = 1),
- Unlocked the fisrt two regions,
- Erased the first two regions (8 KBytes only),
- Copied the SAM-BA Boot to the first 4.5 kbytes Flash memory area,
- Locked these regions,
- Start the SAM-BA Boot (second power up with TST = 0).
At this level, the target is working out of internal Flash with SAM-BA Boot and waiting serial connection from SAM-PRO through its USB socket.


 


SAM-BA 全称: SAM - Boot Assistant (SAM-BA?)
系统恢复程序(System Recovery Procedure)
1,目标板下电,
2,重新对目标板上电之前请确保TST按下(中间的那个绿色按钮)
3,目标板上电,并请等待10 秒钟,
4,下电,将TST 信号悬空,
5,上电,此时目标板上的SAM-BA Boot 应用程序已经运行于FLASH 并等待来自于USB 或者DBGU 的主连接(PC)
然后即可使用sam-ba下载固件了。

文章评论0条评论)

登录后参与讨论
我要评论
0
10
关闭 站长推荐上一条 /2 下一条