renode icon indicating copy to clipboard operation
renode copied to clipboard

Basic ADC Feed Usage

Open LeoSunTL opened this issue 10 months ago • 0 comments

Beginer to Renode. Trying to get familar with the basic usage.

Using basic ADC example from Zephyr "zephyr\samples\drivers\adc\adc_dt". Start emulation with resc file:

using sysbus
$name?="nucleo_l073rz"
mach create $name

machine LoadPlatformDescription $ORIGIN/nucleo_l073rz.repl

showAnalyzer usart2

macro reset
"""
    sysbus LoadELF $ORIGIN/zephyr.elf
    cpu0 VectorTableOffset `sysbus GetSymbolAddress "_vector_table"`
    cpu0 EnableZephyrMode
    cpu0 EnableProfilerCollapsedStack $ORIGIN/shell_module-profile true
"""

runMacro $reset

When I tried feed data to any adc1 channel, there is nothing print out from the serial: Want to understand why the code blocks at "adc_channel_setup_dt(&adc_channels[i]);", how should I feed data to adc input channel properly?

Image

LeoSunTL avatar Mar 28 '25 00:03 LeoSunTL