Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years ago.
How do I directly access registers on the F410RE?
I've begun working with the Nucleo F401RE, but I'm having trouble with directly accessing registers. I need to control the ADC more accurately than just using a software wait and then using the read() function from AnalogIn. From what I understand, the ADC can sample up to 2.4Msps, but I'm not quite sure how to do that, and I can't find the hardware addresses in any of the libraries. Can somebody point me in the right direction, or show me an example? I would greatly appreciate it.
1 Answer
10 years ago.
Here are the definitions: http://developer.mbed.org/users/mbed_official/code/mbed-src/file/cc1c4962551c/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/stm32f401xe.h
You use it for example as:
if (ADC1->SR & ADC_SR_EOC) //End of conversion flag is set