Analog input on xdot
- This topic has 3 replies, 2 voices, and was last updated 7 years, 3 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Tagged: analog input
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!
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);
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
Ok
thx for the info 🙂
Best regards,
Martin