Search found 566 matches

by boarchuz
Wed Nov 25, 2020 9:43 pm
Forum: General Discussion
Topic: RTC fast memory usage and slow memory size
Replies: 8
Views: 13962

Re: RTC fast memory usage and slow memory size

That 4k is longer reserved in IDF: https://github.com/espressif/esp-idf/commit/ef10c2576ff14afa033ef22105406399abc570af You can use RTC_DATA_ATTR macro to place there or access memory at 0x50000000, eg. https://github.com/espressif/esp-idf/blob/178b122c145c19e94ac896197a3a4a9d379cd618/components/ulp...
by boarchuz
Wed Nov 18, 2020 10:41 pm
Forum: General Discussion
Topic: ULP ADC read help
Replies: 2
Views: 2961

Re: ULP ADC read help

Not directly possible. You'll either need to include all variations of ADC instruction in the ULP program and have the ULP jump to the correct one based on a variable that can be changed by the SoC, or change the ULP program when you want to change the ADC channel. You could try updating just the on...
by boarchuz
Mon Nov 09, 2020 2:31 am
Forum: ESP-IDF
Topic: debug logging from adc_set_init_code (on main thread) causing an abort because it thinks it calls from an ISR
Replies: 2
Views: 2526

Re: debug logging from adc_set_init_code (on main thread) causing an abort because it thinks it calls from an ISR

Looks like it's because adc_set_init_code, which includes a ESP_LOGD, is being called in a critical section from adc1_get_raw.

Comment out that line or reduce logging level, and consider filing an issue on GitHub.
by boarchuz
Sun Nov 08, 2020 10:16 am
Forum: Hardware
Topic: (solved) getting a WDT error that doesn't make sense
Replies: 5
Views: 6636

Re: getting a WDT error that doesn't make sense

Is there a busy loop in Buzzer and other wdt-triggering tasks? Perhaps in some function common to them all?
Post Buzzer task here?
by boarchuz
Sun Nov 08, 2020 10:15 am
Forum: ESP-IDF
Topic: esp_https_ota is complaining about "invalid size"
Replies: 4
Views: 4216

Re: esp_https_ota is complaining about "invalid size"

As an aside, can someone confirm that the second OTA's offset is 0x20000 because it has to be aligned on a multiple of 0x1000? 0x200000, aligned to 0x10000 after the end of the previous partition. I think you're seeing this error because flash is erased in 4K (SPI_FLASH_SEC_SIZE) sectors and your a...
by boarchuz
Thu Nov 05, 2020 7:44 am
Forum: ESP-IDF
Topic: I2C unexpected behavior
Replies: 4
Views: 3100

Re: I2C unexpected behavior

As I understand, it's a boolean to enable the check (not the expected logic level as perhaps you're interpreting it?).

Try "true" in its place.
by boarchuz
Thu Nov 05, 2020 6:24 am
Forum: ESP-IDF
Topic: I2C unexpected behavior
Replies: 4
Views: 3100

Re: I2C unexpected behavior

i2c_master_write_byte(cmd, (address << 1) | I2C_MASTER_WRITE , I2C_MASTER_ACK);
That third arg is for ACK check, and I2C_MASTER_ACK == 0.
by boarchuz
Thu Nov 05, 2020 6:16 am
Forum: ESP-IDF
Topic: Reading system time in ULP
Replies: 2
Views: 3247

Re: Reading system time in ULP

You need to poke the RTC controller to update the register.

eg. with macros it would look something like this:

Code: Select all

// Set update bit
I_WR_REG_BIT(RTC_CNTL_TIME_UPDATE_REG, RTC_CNTL_TIME_UPDATE_S, 1)
// Loop until valid bit is set
I_RD_REG_BIT(RTC_CNTL_TIME_UPDATE_REG, RTC_CNTL_TIME_VALID_S)
I_BL(-1, 1)
by boarchuz
Wed Nov 04, 2020 3:10 pm
Forum: ESP-IDF
Topic: Calling IRAM_ATTR interrupts with C++
Replies: 1
Views: 2447

Re: Calling IRAM_ATTR interrupts with C++

You are dereferencing the arg "(void *)TIMER_0" (ie. NULL) in your handler.