2013-01-21 02:12 AM
Hey Hi, I have been using stm32f103zet6 (144 pin package, Keil compiler and the debugger is stlink ). In my program i use the Jtag pins as Jtag/Port pins (Depending upon the jumper position and a condition in a program ). I wanted to debug the program so i removed the condition, now its not allowing me to flash any program . The condition in the program is
GPIOC->CRH &= 0xFF0FFFFF; //PC13 for enable/disable JTAG (FACTORY SETTING) GPIOC->CRH |= 0x00400000; if((GPIOC->IDR &= 0x2000) == 0) { AFIO->MAPR &= 0xF8FFFFFF; while(1); } else { AFIO->MAPR |= 0x04000000; } So i need help to over come this problem ASAP2013-01-21 05:02 AM
Why the '&=' here?
if((GPIOC->IDR &= 0x2000) == 0) Do you have an LED or something to signal which code path you have entered? How about outputting telemetry via a serial port?2013-01-21 09:54 PM
Hey actually im using this condition in my main application program
if((GPIOC->IDR &= 0x2000) == 0)
Could you please tell me how to bring the controller to System memory using boot configuration, i have done as it is given in the stm family manual i.e, BOOT0 =1(3.3v) and BOOT1=0(GND) but nothing happened.2013-01-21 11:38 PM
Booting with BOOT0 High should get you into the system loader. From there it will sit waiting for a pattern on the USART pins.
Make sure you have the AFIO and GPIO clocks enabled.