Atmel SAM-4S Xplained到手已经好久了,主要是近来工作很忙,晚上还要加班什么的,休息日又来准备新的驾考科目一,没时间弄,最近几天晚上得闲,赶紧要研究下Atmel SAM-4S Xplained了,测试下SAM4S16C,不然太对不起爱板网以及xinxin斑竹的厚爱了。 在ATMEL公司网站下到了:asf-standalone-archive-3.5.1.62.zip,150M左右的大小。我只解压缩了sam文件甲,后来发现,好象发现好多文件不完整,这个是后话。刚弄到资料,一看全傻眼了,文件复杂难以理出头绪。静下心来,先装板子的JLINK驱动,玩一下板子提供的LED 控制功能。 1:下载 :SAM4S-XPLD__KitsFiles.zip 并解压缩。里面有SAM4S-XPLD_boardREV_A09-1564-3.zip 板子说明文件 SAM4S-XPLD_PCB_B.zip PCB图纸 SAM4S-XPLD_SCHEMA_B.zip 原理图 SAM4S-XPLD_test_11_public.zip 测试文件 等4个压缩包,再解压 SAM4S-XPLD_test_11_public.zip 2:按照上面解压的文件里 SAM4S_XPLD_Test_Software.pdf的说明指导。安装 Setting up 里面的 sam-ba_2.11.exe 以及Install_JLinkCDCDriver.exe 并patch SAM-BA_2.11_sam4s_patch_0.1 里面的文件到C盘的JLINK目录里面,完成补丁更新。 把 SAM4S-XPLD_test_11_public demo文件夹复制到 SAM-BA v2.11.exe文件夹下。就完成了准备工作了。 3:连接Atmel SAM-4S Xplained的JLINK 仿真接口,然后安装驱动。等待驱动完成。 4:在Atmel SAM-4S Xplained上找到JP25以及JP7。全部短接后,上电,等待 5-10秒,彻底把内部的rom擦除干净。然后断电。 5:把JP25拔掉,重新连接好Atmel SAM-4S Xplained的JLINK 仿真接口。点 demo里的SAM4S_XPLD_DEMO_Programming.bat文件。会出来一个cmd的窗口。耐心等待一会,会出来一个log文件,如果显示这样的文字,说明烧写成功啦。 -I- Waiting ... -I- TCL platform : Windows NT -I- SAM-BA 2.11 on : windows -I- Retrieved arguments from command line : -I- argv 0 : \jlink\ARM0 -I- argv 1 : at91sam4s16-ek -I- argv 2 : SAM4S_XPLD_DEMO_Programming.tcl 0 \jlink\ARM0 -I- Connection : \jlink\ARM0 (target(comType) = 2) -I- Board : at91sam4s16-ek -I- Traces Level : 4 -I- target(handle) : 24585200 Read device Chip ID at 0x400e0640 --- get 0x00000000 Read device Chip ID at 0x400e0740 --- get 0x28ac0ce0 -I- Found processor : at91sam4s16 (Chip ID : 0x28ac0ce0) sourcing device file C:/Program Files/ATMEL Corporation/sam-ba_2.11/sam-ba.exe/../tcl_lib/devices/at91sam4s16.tcl sourcing board description file C:/Program Files/ATMEL Corporation/sam-ba_2.11/sam-ba.exe/../tcl_lib/at91sam4s16-ek/at91sam4s16-ek.tcl -I- Loading applet applet-lowlevelinit-sam4s16.bin at address 0x20000800 -I- Memory Size : 0x2 bytes -I- Buffer address : 0x4 -I- Buffer size: 0x0 bytes -I- Applet initialization done -I- Low level initialized -I- Loading applet applet-flash-sam4s16.bin at address 0x20000800 -I- Memory Size : 0x100000 bytes -I- Buffer address : 0x20002054 -I- Buffer size: 0x1DA00 bytes -I- Applet initialization done -I- FLASH initialized -I- Command line mode : Execute script file : SAM4S_XPLD_DEMO_Programming.tcl -I- === SAM4S-EK product test software Programming === -I- === Init internal Flash === -I- Loading applet applet-flash-sam4s16.bin at address 0x20000800 -I- Memory Size : 0x100000 bytes -I- Buffer address : 0x20002054 -I- Buffer size: 0x1DA00 bytes -I- Applet initialization done -I- === Erase internal Flash === -I- GENERIC::EraseAll -I- === Send executable bin into Flash === -I- Send File ./sam4s_xplained_demo.bin at address 0x400000 first_sector 0 last_sector 0 -I- Complete 0% -I- Writing: 0x1B18 bytes at 0x0 (buffer addr : 0x20002054) -I- 0x1B18 bytes written by applet -I- === Chang GPNVM to Boot from Flash === -I- GPNVM1 set -I- === End of Flash programming ===
5:然后按下Atmel SAM-4S Xplained上的reset键或者是重新上电。就可以看到2个黄色的LED闪烁了。手指在滑动区域滑动,可以明显的看到LED闪烁的频率。 |