Search found 48 matches

by SparkyNZ
Thu Aug 22, 2024 6:49 pm
Forum: ESP-IDF
Topic: ESP32-WROOM - Problems getting high frequency GPIO working
Replies: 6
Views: 1239

Re: ESP32-WROOM - Problems getting high frequency GPIO working

See https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/ledc.html#ledc-api-supported-range-frequency-duty-resolution The maximum frequency you can get is 80MHz/(1 << ResolutionBits); i.e. ResolutionBits[max] = floor(log2(80000000/desiredFrequency)). LEDC_TIMER_2_BI...
by SparkyNZ
Thu Aug 22, 2024 9:38 am
Forum: ESP-IDF
Topic: ESP32-WROOM - Problems getting high frequency GPIO working
Replies: 6
Views: 1239

Re: ESP32-WROOM - Problems getting high frequency GPIO working

Question now is.. how can I get a 14MHz output? ledc_timer_config() fails when I try 14000000.
by SparkyNZ
Thu Aug 22, 2024 9:29 am
Forum: ESP-IDF
Topic: ESP32-WROOM - Problems getting high frequency GPIO working
Replies: 6
Views: 1239

Re: ESP32-WROOM - Problems getting high frequency GPIO working

You may want to check that IDF functions like ledc_timer_config(...) return ESP_OK. [/quote] I found that when I set bit_num to LEDC_TIMER_2_BIT , I got ESP_OK for ledc_timer_config() . Unfortunately I just had a constant high output on GP18. Looking at the definition of bit_num , it says that its d...
by SparkyNZ
Thu Aug 22, 2024 7:21 am
Forum: ESP-IDF
Topic: ESP32-WROOM - Problems getting high frequency GPIO working
Replies: 6
Views: 1239

Re: ESP32-WROOM - Problems getting high frequency GPIO working

MicroController wrote:
Tue Aug 20, 2024 9:05 pm
You may want to check that IDF functions like ledc_timer_config(...) return ESP_OK.
I did try lower frequencies. Just had the sense to print out the return of ledc_timer_config() and yeah.. it's returning -1. I'll have a look when I get a chance. Wish I had more time :-) Thanks.
by SparkyNZ
Tue Aug 20, 2024 4:29 am
Forum: ESP-IDF
Topic: ESP32-WROOM - Problems getting high frequency GPIO working
Replies: 6
Views: 1239

ESP32-WROOM - Problems getting high frequency GPIO working

I took this code as a base: https://github.com/espressif/esp-idf/blob/d7ca8b94c852052e3bc33292287ef4dd62c9eeb1/examples/peripherals/ledc/ledc_basic/main/ledc_basic_example_main.c When I first compiled and downloaded the code, I saw triangle wave on my scope at 2MHz. I tried dropping the frequency to...
by SparkyNZ
Wed Jan 17, 2024 4:37 am
Forum: ESP-IDF
Topic: What's the fastest form of debug output?
Replies: 9
Views: 28838

Re: What's the fastest form of debug output?

The baud rate setting is a bit hidden: you need to select 'Custom UART' for that setting, then you can set the Tx and Rx pin as well as the baudrate. Simply keep the Tx and Rx at GPIO 1 and 3 and change the baud rate to whatever you need. Oh no.. I've had 2 blue screen of death occurrences on my Wi...
by SparkyNZ
Wed Jan 17, 2024 4:27 am
Forum: ESP-IDF
Topic: What's the fastest form of debug output?
Replies: 9
Views: 28838

Re: What's the fastest form of debug output?

In your case, you probably need all the CPU speed you can get, so I'd go for an ESP32-S3 devboard - e.g. the ESP32-S3-Devkit-C is the 'default' universal one you can use. There's different flavours depending on if you want external PSRAM - if speed is a concern and you need this, select one with oc...
by SparkyNZ
Tue Jan 16, 2024 8:36 pm
Forum: ESP-IDF
Topic: How to change Console UART Baud rate?
Replies: 0
Views: 7335

How to change Console UART Baud rate?

I am finding that I cannot seem to change the console output baudrate at all. I'm using IDF 4.3.6 now (had to roll back so I'm not using the latest). If I change either of the below 2 values in sdkconfig , the values change back to 115200 when I build my project. CONFIG_CONSOLE_UART_BAUDRATE=921600 ...
by SparkyNZ
Tue Jan 16, 2024 7:16 pm
Forum: ESP-IDF
Topic: What's the fastest form of debug output?
Replies: 9
Views: 28838

Re: What's the fastest form of debug output?

I was referring to USB-serial-JTAG, which is an integrated peripheral later ESP32 chips have that allow you to directly connect it to an USB port. You can get speeds approaching 12MBit with that, which is nice and fast compared to UARTs. I wouldn't go the JTAG way; I'm not sure if protocol overhead...
by SparkyNZ
Mon Jan 15, 2024 11:55 am
Forum: ESP-IDF
Topic: What's the fastest form of debug output?
Replies: 9
Views: 28838

Re: What's the fastest form of debug output?

Depends. You can set serial to a faster baud rate, that would net you more speed. If your chip supports it, you can also switch to USB-serial-JTAG or USB-OTG; those two are also faster. From here: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/jtag-debugging/index.html The q...