AnsweredAssumed Answered

Program flash problem

Question asked by kumar.chethan on Jan 21, 2013
Latest reply on Jan 22, 2013 by Clive One
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 ASAP

Outcomes