AnsweredAssumed Answered

problem with pb3

Question asked by hp.kazem on Dec 6, 2012
Latest reply on Dec 6, 2012 by Clive One
hi every body
i have problem with pb3 pb4 and some other pins
when i remap it in program have no response on simulator
my programmer is j-link & when i program via jtag
i want to use pb3 in gpio mode but doesn't work correctly

#include "stm32f10x.h"
#include "lcd4bit.h"
#include "RCC_init.h"
//void GPIO_PinRemapConfig(uint32_t GPIO_Remap, FunctionalState NewState);
extern void RCCPreInit();

int main(void)
{    unsigned int i=0;
    unsigned int s=0;    
    unsigned int A=100;    
    GPIO_InitTypeDef GPIO_InitStructure;
    RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_AFIO, ENABLE);
    GPIO_PinRemapConfig( GPIO_Remap_SWJ_Disable, DISABLE);/*!< Full SWJ Disabled (JTAG-DP + SW-DP) */
    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_7
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  GPIO_Init(GPIOB, &GPIO_InitStructure);     
    GPIO_Init(GPIOA, &GPIO_InitStructure);
        for(i=0;i<350000;i++){} //delay              
          for(i=0;i<350000;i++){} //delay