Reading Hall Sensor Values from ULP
Posted: Thu Feb 08, 2018 1:48 pm
Hi,
I'm trying to get the current measurments from the hall sensor in ULP Mode.
When I'm reading them from a context outside the deep sleep mode like this:
I get values that change when a magnet is getting closer.
When I try to read those values from ULP I just get random values. I followed the ulp_adc example from espressif changed the channel to ADC1_CHANNEL_0 - also tried Channel 3 - as the documentation says the hall sensor is connected to both.
I also changed the adc_channel constant in the adc.S file.
Is it even possible to read the values from the hall sensor in deep sleep mode?
Thanks
I'm trying to get the current measurments from the hall sensor in ULP Mode.
When I'm reading them from a context outside the deep sleep mode like this:
Code: Select all
adc1_config_width(ADC_WIDTH_12Bit);
hall_sensor_read();
When I try to read those values from ULP I just get random values. I followed the ulp_adc example from espressif changed the channel to ADC1_CHANNEL_0 - also tried Channel 3 - as the documentation says the hall sensor is connected to both.
Code: Select all
adc1_config_channel_atten(ADC1_CHANNEL_0, ADC_ATTEN_DB_0);
adc1_config_width(ADC_WIDTH_BIT_12);
adc1_ulp_enable();
Is it even possible to read the values from the hall sensor in deep sleep mode?
Thanks