2025-11-11 7:41 AM - last edited on 2025-11-11 7:59 AM by Andrew Neil
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?
Solved! Go to Solution.
2025-11-12 7:30 AM
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.