Search found 643 matches

by mzimmers
Sun Oct 17, 2021 10:03 pm
Forum: ESP-IDF
Topic: (solved) issues with I2C
Replies: 1
Views: 1820

Re: issues with I2C

I figured it out with help from the tools example -- I needed to have my ack settings as follows: err = (i2c_master_start(i2cCommand)); err = (i2c_master_write_byte(i2cCommand, I2C_MCP7940_W, ACK_CHECK_EN)); err = (i2c_master_write_byte(i2cCommand, 0x00, ACK_CHECK_EN)); err = (i2c_master_start(i2cCo...
by mzimmers
Sat Oct 16, 2021 12:40 am
Forum: ESP-IDF
Topic: (solved) issues with I2C
Replies: 1
Views: 1820

(solved) issues with I2C

Hi all - I'm porting some code to the ESP32. The app connects to an external RTC https://www.mouser.com/datasheet/2/268/25010A-71550.pdf . I'm trying to convert its primitive functions to the IDF. This is the existing sequence for a register read: // uint8_t result = 0; // SI2C_Start(); // SI2C_Writ...
by mzimmers
Fri Oct 15, 2021 3:49 am
Forum: ESP-IDF
Topic: (solved) WDT triggered with addition of empty function
Replies: 3
Views: 2187

Re: WDT triggered with addition of empty function

Hi Sprite - I'm not ruling out the error occurring somewhere else, but...it only manifests when I enable that function. EDIT: I've done some more looking at this, and the problem doesn't occur if I disconnect all the peripherals (LEDs, buttons, etc.) How these connections could result in a WDT trigg...
by mzimmers
Fri Oct 15, 2021 3:04 am
Forum: ESP-IDF
Topic: (solved) WDT triggered with addition of empty function
Replies: 3
Views: 2187

(solved) WDT triggered with addition of empty function

Hi all - I've been fighting this problem for days, and am out of ideas. I am porting an app that is currently running, when a certain code passage looks like this: #if 0 // mzimmers MCP7940_Init(); (I use the #if 0 to disable sections that I haven't finished yet.) But if I enable this function, like...
by mzimmers
Sat Oct 09, 2021 7:30 pm
Forum: ESP-IDF
Topic: (solved) how to program sub-tick delays?
Replies: 2
Views: 1832

Re: how to program sub-tick delays?

Oh, that's perfect:

Code: Select all

#include "rom/ets_sys.h"
void delay_milliseconds(uint64_t ms) {
    uint64_t us = ms * 1000;
    if (ms < 1000) {
            ets_delay_us(us);
    } else {
        vTaskDelay((ms) / portTICK_PERIOD_MS);
    }
}
Thanks, chegewara.
by mzimmers
Sat Oct 09, 2021 5:04 pm
Forum: ESP-IDF
Topic: (solved) how to program sub-tick delays?
Replies: 2
Views: 1832

(solved) how to program sub-tick delays?

Hi all - The app I'm porting to the ESP32 needs relatively short (<1ms) delays. Clearly the vTaskDelay() function won't work for this. I was looking at the docs regarding General Purpose Timers. 1. is this the right component to use? 2. from the docs (and the example), it's not clear to me how I spe...
by mzimmers
Fri Oct 08, 2021 6:04 pm
Forum: IDEs for ESP-IDF
Topic: getting the debugger working in VS Code
Replies: 9
Views: 29831

Re: getting the debugger working in VS Code

Hi bignacio -

Yes, I have a launch.json file. I'm only opening one project.

The behavior has changed -- now when I press F5, I get an error "The preLaunchTask 'C/C++: arm-none-eabi-g++ build active file' terminated with exit code -1.

Not sure what I've done to introduce this behavior...
by mzimmers
Fri Oct 01, 2021 11:23 pm
Forum: IDEs for ESP-IDF
Topic: getting the debugger working in VS Code
Replies: 9
Views: 29831

Re: getting the debugger working in VS Code

Hi bignacio - sorry for the late reply; lots of unrelated tasks going on right now. My current issue with the debugger is when I get to the step where I press F5, it prompts me to select an environment, and the only choices are: C++ (GDB/LLDB) C++ (Windows) I imagine this is something to do with a c...
by mzimmers
Fri Oct 01, 2021 4:43 pm
Forum: IDEs for ESP-IDF
Topic: (solved) VS Code: proper location for c_cpp_properties.json?
Replies: 2
Views: 12562

(solved) VS Code: proper location for c_cpp_properties.json?

Hi all - I thought I had my IDE set up properly, but now I'm not so sure. I configured it according to the instructions, and can now build and flash my app. I wanted to try an example project, so I opened that folder, and to my surprise, the system couldn't find the header files within the IDF. Doin...
by mzimmers
Fri Oct 01, 2021 4:26 am
Forum: ESP-IDF
Topic: (solved) how to encode binary (blob) in .csv file?
Replies: 4
Views: 4913

(solved) how to encode binary (blob) in .csv file?

Hi all - I'm porting an app to the ESP32. It currently stores all of its configuration settings in a struct, which it reads and writes in its entirety. I can read and write the blob from the app, using NVS calls. What I need to do is figure out how to initialize it. My original idea is to write a se...