cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in STM32F103: enabling FSMC clock pulls up PB7

owlm00n
Associate

I have an STM32F103 board call 野火STM32F103ZE_霸道开发板,i found  enable  FSMC clock will pull up PB7  GPIO to 3.26v ,   i try decrease my code ceaselessly to verify this bug, finaly it can reproduce bug easily like this 

#include "stm32f10x.h"

int main (void)
{
//RCC->AHBENR |= 0x100//RCC_AHBPeriphClockCmd ( RCC_AHBPeriph_FSMC, ENABLE );
*( unsigned int * )0X40021014 |= ( (1) << 8);
}

void SystemInit(void)
{
// nothing in here
}

Is this a problem specific to a single chip or a more general chip?

10 REPLIES 10

Excellent answer, thanks

1-Now I know how it works,  it is diffcult to know without you answer, learn a lot.

 

so you can disable it by setting AFIO_MAPR2.FSMC_NADV (don't forget to enable AFIO clock in RCC before writing to its registers).

2-I try this way , but FSMC_NADV bit cat write to True, so PB7 always pullup when  FSMC clock Enable.