I’m writing firmware for a STM32F446re and I’m in the process of writing test cases for it using Renode. I’m using the Analog.STM32_ADC class in Renode to mock input values going into the ADC of the microcontroller.
# configuration in stm42f4xx.repl
adc1: Analog.STM32_ADC @ sysbus 0x40012000
IRQ -> nvic@18
However, I find I’m not able to change the value in the ADC_DR register through the Renode monitor, thus meaning my firmware is not reading in any values from the mock ADC.
I have tried using the WriteDoubleWord
command to write to the ADC_DR register directly, but it is read-only and this did not work. Additionally, the WriteDefault
command is not available in the Analog.STM32_ADC class, only in classes for other specific STM32 models.
If you could please tell me how I can change the value that the ADC reads it would be highly appreciated.