AnsweredAssumed Answered

TSensor example in STM32F10x_StdPeriph_Lib_V3.5.0

Question asked by diz on Sep 9, 2011
Latest reply on Sep 12, 2011 by diz
I got the temperature sensor example form the standard library and it works fine on my STM3210E-EVAL board. But I would like to know, why the FSMC must be disabled before a I2C communication is performed.
In every iteraten there is the sequence:
#ifdef USE_STM3210E_EVAL        
    /* Disable FSMC */
    RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, DISABLE);
    /* Initialize the Temperature Sensor */
#endif /* USE_STM3210E_EVAL */     
      /* Get double of Temperature value */
      TempValue = LM75_ReadTemp();
#ifdef USE_STM3210E_EVAL          
      /* Enable FSMC */
      RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, ENABLE);
#endif /* USE_STM3210E_EVAL */

I tried to comment out the disable/enable calls, and this indeed resulted in not working the example (I get always the same value then), so the disable/enable seems indeed to be needed.

But why is this necessary?