Search found 208 matches

by ESP_Dazz
Fri Jan 22, 2021 8:24 pm
Forum: ESP32 Arduino
Topic: Random timer miscount (TIMER_GROUP_0 TIMER_0)
Replies: 2
Views: 403

Re: Random timer miscount (TIMER_GROUP_0 TIMER_0)

There is some delay and variation to when your interrupt will run. Usually when an interrupt occurs, it takes 2 or 3 microseconds to get into the interrupt. However, you can't assume that this means your interrupt will run 2 to 3 us after an edge as there are other factors that can prevent your inte...
by ESP_Dazz
Fri Jan 22, 2021 8:11 pm
Forum: ESP-IDF
Topic: Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Replies: 1
Views: 44

Re: Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.

The error LoadProhibited means that the CPU tried to load a variable form an illegal address. The offending address is EXCVADDR: 0x00000000 ( see docs for more details ). The address 0x00000000 looks like some NULL pointer was accessed. The offending line of the bad load was 0x400da3d9: pin::calc_an...
by ESP_Dazz
Fri Jan 22, 2021 8:08 pm
Forum: General Discussion
Topic: Dual Core Synchronization
Replies: 2
Views: 83

Re: Dual Core Synchronization

Could you post your code and explain how each task is accessing the I2C bus. If you are using the ESP-IDF I2C driver API, you can assume that the driver API is already thread safe (i.e., the driver API can be called form multiple tasks).
by ESP_Dazz
Fri Jan 22, 2021 8:00 pm
Forum: ESP-IDF
Topic: ESP-IDF vs FreeRTOS heap allocation
Replies: 3
Views: 80

Re: ESP-IDF vs FreeRTOS heap allocation

So does FreeRTOS pvPortMalloc() also use heap_caps_malloc()? No, because pvPortMalloc() itself is never called. Based on the enabled FreeRTOS configs, pvPortMallocTcbMem() and pvPortMallocStackMem() are called instead. All of these macros are defined in port_macro.h What about the malloc hook/callb...
by ESP_Dazz
Fri Jan 22, 2021 6:59 pm
Forum: ESP-IDF
Topic: ESP-IDF vs FreeRTOS heap allocation
Replies: 3
Views: 80

Re: ESP-IDF vs FreeRTOS heap allocation

Hi, The FreeRTOS documentation suggest to use the pvPortMalloc() / pvPortFree() and vApplicationMallocFailedHook() when handling memory allocation. The ESP-IDF documentation points to heap_caps_malloc() / heap_caps_free() and heap_caps_register_failed_alloc_callback() for the same memory handeling ...
by ESP_Dazz
Tue Jan 19, 2021 12:47 pm
Forum: ESP-IDF
Topic: Basic Hello World ESP-IDF failed
Replies: 10
Views: 436

Re: Basic Hello World ESP-IDF failed

As the error suggest, the CMake is seeing a "build" folder which "doesn't seem to be a CMake build directory" so it is "Refusing to automatically delete files". Try deleting the build folder in your "hello_world" project and then run "idf.py set-target esp32" again.
by ESP_Dazz
Tue Jan 12, 2021 10:35 am
Forum: ESP-IDF
Topic: Print stack trace at runtime
Replies: 2
Views: 345

Re: Print stack trace at runtime

Use esp_backtrace_print() in esp_debug_helpers.h
by ESP_Dazz
Sat Jan 09, 2021 6:45 pm
Forum: ESP-IDF
Topic: ESP32: which hardware timers are occupied by freertos
Replies: 3
Views: 177

Re: ESP32: which hardware timers are occupied by freertos

None of them is "occupied" by FreeRTOS. Why would they need to take them from "users"? Generally, most operating systems have a "system tick" which requires an interrupt be generated at a regular interval. This usually requires some form of hardware timer be used to generate this system tick for th...
by ESP_Dazz
Mon Dec 21, 2020 1:48 pm
Forum: Hardware
Topic: I2S ADC triggered with CAN data frame message
Replies: 2
Views: 259

Re: I2S ADC triggered with CAN data frame message

The question is: Is there a way to trigger the ADC with the SOF (start of frame bit) of the CAN frame on the CAN bus? Currently no, the CAN controller will only generate an interrupt once a CAN message has been confirmed valid (i.e., Acknowledged and CRC is checked). If you need an interrupt on the...
by ESP_Dazz
Mon Dec 21, 2020 9:07 am
Forum: ESP-IDF
Topic: How are asm labeled functions called? [Resolved]
Replies: 2
Views: 213

Re: How are asm labeled functions called?

You can get the disassembly yourself by running either objdump or gdb:

Assuming your project folder is "hello-world":

Code: Select all

cd hello-world
xtensa-esp32-elf-gdb ./build/hello-world.elf
Once in GDB, run:

Code: Select all

disassemble app_main

Go to advanced search