Timer and debug

kishorsoni
Posts: 2
Joined: Sun Dec 20, 2020 7:53 am

Timer and debug

Postby kishorsoni » Wed Dec 30, 2020 6:32 am

Hi all
I am new to esp32. I upload the simple led blink example and run it successfully.

I want to know two things.

1) code for using timer . I mean to say where is timer initializing code ? how they get 1ms tick from timer ?
2) how to use software debug (without hardware debugger) to see the program execution sequence.

Thanks

ESP_Sprite
Posts: 9746
Joined: Thu Nov 26, 2015 4:08 am

Re: Timer and debug

Postby ESP_Sprite » Fri Jan 01, 2021 3:44 am

The blink example uses the internal FreeRTOS timing mechanism, if I recall correctly. If you want to do more fancy stuff, you can look into either other FreeRTOS timing API's, our own esp_timer API, or you can look at using a hardware timer.

Debugging entirely in software is only partially supported as in we have a GDB stub that kicks in whenever your program crashes. It can't be invoked in normal, running code, and it can't continue running the program after it has kicked in, so you may want to invest in a hardware debugger anyway.

Who is online

Users browsing this forum: Baidu [Spider], Majestic-12 [Bot] and 118 guests