Analog input on xdot

Home Forums mDot/xDot Analog input on xdot

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #21883
    Martin Pelletier
    Participant

    i want to use one analog input on the xdot -> (pin 12)
    i got mdot-library 3.0.0 and mbed-os 5.4.7

    AnalogIn Temperature(SPI_MISO)

    And i used Temperature.read_u16();
    But i always got 0x0000.
    Is it something i forgot?

    thx!

    #21886
    Martin Pelletier
    Participant

    i found something posted by Lucian Corduneanu 20 Jul 2017.

    Concerning the analog input does not work after a sleep(). It is about the ADC clock …

    I put this code just after the sleep function and it works!!
    // Enable the HSI (to clock the ADC)
    RCC_OscInitTypeDef RCC_OscInitStruct;
    RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
    RCC_OscInitStruct.HSIState = RCC_HSI_ON;
    RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
    HAL_RCC_OscConfig(&RCC_OscInitStruct);

    #21904

    Hi Martin,

    This fix was added as of mbed-os-5.5.2. I expect a new stable library release sometime in Q1 of 2018.

    Kind regards,
    Leon

    #21905
    Martin Pelletier
    Participant

    Ok
    thx for the info 🙂

    Best regards,
    Martin

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.