void Reset_Handler(void)
{
/* FSMC Bank1 NOR/SRAM3 is used for the STM3210E-EVAL, if another Bank is
required, then adjust the Register Addresses */
// SystemInit_ExtMemCtl();
SystemInit()
详情回复
发表于 2013-7-2 17:50
void Reset_Handler(void)
{
/* FSMC Bank1 NOR/SRAM3 is used for the STM3210E-EVAL, if another Bank is
required, then adjust the Register Addresses */
// SystemInit_ExtMemCtl();
SystemInit();
/* restore original stack pointer */
// asm(" LDR r0, =_estack");
// asm(" MSR msp, r0");
/* Initialize data and bss */
__Init_Data();
/* Call the application's entry point.*/
main();
}
void SystemInit (void)
{
/* Reset the RCC clock configuration to the default reset state(for debug purpose) */
/* Set HSION bit */
RCC->CR |= (uint32_t)0x00000001;
/* Configure the System clock frequency, HCLK, PCLK2 and PCLK1 prescalers */
/* Configure the Flash Latency cycles and enable prefetch buffer */
SetSysClock();
(gdb) n
Reset_Handler () at startup_stm32f10x_hd.c:262
262 SystemInit();
(gdb) n
268 __Init_Data();
(gdb) n
271 main();
(gdb) n
Breakpoint 1, DEV_ReadCommSets () at device.c:980
980 for (i = 0; i < COMM_MAX_SETS; i++)
(gdb) n
982 value = BytesToDword(&DEV_ReadData[i * 4]);
(gdb) n
984 pSets->value = value; //运行这条语句后进入硬中断void HardFault_Handler(void){ while(1){} }中,不知道为什么?
(gdb) n
HardFault_Handler () at stm32f10x_it.c:61
61 {
(gdb) n
64 {}