我是想测试芯片能否正常烧录程序,自己在转接座周围搭了简易电路,程序是用的探索者F407的例程(修改了Device和IO口)
程序如下:
#include "sys.h"
#include "delay.h"
void LED_Init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9 | GPIO_Pin_10;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_SetBits(GPIOA,GPIO_Pin_9 | GPIO_Pin_10);
}
int main(void)
{
delay_init(168);
LED_Init();
while(1)
{
GPIO_ResetBits(GPIOA,GPIO_Pin_9);
GPIO_SetBits(GPIOA,GPIO_Pin_10);
delay_ms(5);
GPIO_SetBits(GPIOA,GPIO_Pin_9);
GPIO_ResetBits(GPIOA,GPIO_Pin_10);
delay_ms(5);
}
}
下载提示:
JLink info:
------------
DLL: V6.10i, compiled Oct 25 2016 19:31:51
Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
Hardware: V7.00
S/N : 20090928
Feature(s) : RDI,FlashDL,FlashBP,JFlash,GDBFull
* JLink Info: Found SWD-DP with ID 0x2BA01477
* JLink Info: Found SWD-DP with ID 0x2BA01477
* JLink Info: AP-IDR: 0x24770011, Type: AHB-AP
* JLink Info: Found Cortex-M4 r0p1, Little endian.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
* JLink Info: CoreSight components:
* JLink Info: ROMTbl 0
@ E00FF000
* JLink Info: ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
* JLink Info: ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
* JLink Info: ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
* JLink Info: ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
* JLink Info: ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
* JLink Info: ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
ROMTableAddr = 0xE00FF000
Target info:
------------
Device: STM32F405RGTx
VTarget = 3.300V
State of Pins:
TCK: 0, TDI: 0, TDO: 1, TMS: 0, TRES: 1, TRST: 1
Hardware-Breakpoints: 6
Software-Breakpoints: 8192
Watchpoints: 4
JTAG speed: 4000 kHz
Erase Done.
Programming Done.
Verify OK.
Application running ...
Flash Load finished at 13:44:15
能下载成功但是对应引脚没有波形输出,已试过多个IO口;
想请教一下大家我是哪里弄得不对,谢谢!
一周热门 更多>