Search found 32 matches

by commando_j
Mon Dec 09, 2024 5:30 am
Forum: ESP-IDF
Topic: Need decimal integer to be BCD
Replies: 2
Views: 1644

Re: Need decimal integer to be BCD

If it can help anyone, I used some code from internet, modified it so that you can use a variable to convert.

// C program to convert hexadecimal to decimal

#include <math.h>
#include <stdio.h>
#include <string.h>

int decimalNumber = 0;

uint8_t hexa1;
uint8_t year;
void hextodec (void ...
by commando_j
Mon Dec 09, 2024 12:58 am
Forum: ESP-IDF
Topic: Need decimal integer to be BCD
Replies: 2
Views: 1644

Need decimal integer to be BCD

I have time values that are retrieved and stored as decimal values. But the same value needs to be written as BCD to the registers of an external RTC.

For example

uint8_t year = 19; //year is 2019, value in decimal

spi_rtcc_wr( rtcc reg: RTCYEAR, time_var: 0x19); //but external RTC needs that 19 ...
by commando_j
Mon Dec 09, 2024 12:49 am
Forum: ESP-IDF
Topic: Getting Hour and Minutes from ESP32 RTC
Replies: 4
Views: 2663

Re: Getting Hour and Minutes from ESP32 RTC

The internal RTC is written into by the example SNTP code of the ESP-IDF. The timeinfo is the structure used to get the internal RTC data. The structure has members for year, hour, minutes... that are accessible by reading .tm_year, .tm_hour, .tm_min...etc...

The good thing is I can get the data ...
by commando_j
Sun Dec 08, 2024 7:02 pm
Forum: ESP-IDF
Topic: Getting Hour and Minutes from ESP32 RTC
Replies: 4
Views: 2663

Re: Getting Hour and Minutes from ESP32 RTC

I think I may have found an answer, but need to test more.

I did

uint8_t hrt = timeinfo.tm_hour;

and then to test I printed

ESP_LOGI(TAG, "The formatted int hour is : %d", hrt);

And it printed the correct value of the current hour that was stored in the internal RTC. Does this make sense?
by commando_j
Sun Dec 08, 2024 6:13 pm
Forum: ESP-IDF
Topic: Getting Hour and Minutes from ESP32 RTC
Replies: 4
Views: 2663

Getting Hour and Minutes from ESP32 RTC

Hello,

I'm working with Espressif-IDE and framework 5.3.1. I am able to get the updated time from SNTP and have it written to the ESP32 RTC. And I can also retrieve individual elements of the RTC time using specifiers in the strftime function, for example

strftime(MY_TIME, sizeof(MY_TIME), "%I:%M ...
by commando_j
Fri Jan 27, 2023 5:57 am
Forum: IDEs for ESP-IDF
Topic: Eclipse with IDF or Espressif-IDE
Replies: 2
Views: 4022

Re: Eclipse with IDF or Espressif-IDE

Yes this is reassuring. I also looked up your name and saw that you are an Espressif engineer, so that confirmed things.
Will Espressif be updating their how-to install page to also recommend the IDE? Thanks
by commando_j
Thu Jan 26, 2023 9:14 pm
Forum: IDEs for ESP-IDF
Topic: Eclipse with IDF or Espressif-IDE
Replies: 2
Views: 4022

Eclipse with IDF or Espressif-IDE

I had Eclipse with ESP-IDF setup a few years ago using Kolban's youtube guides. I'm trying to get back into it but of course versions are newer so that guide doesn't apply 100% now. But now I see this Espressif-IDE. It doesn't seem to be officially backed by Espressif but is used by some. My ...
by commando_j
Wed Dec 18, 2019 8:55 pm
Forum: Hardware
Topic: Holding a GPIO pin during deep sleep
Replies: 3
Views: 9396

Re: Holding a GPIO pin during deep sleep

With nothing connected to the pin,

- Internal Pull-down value: ~45K
- Your Vcc: 3.3V (?)
= 73uA per pin

Depending on the external circuitry hooked to those pins, it could increase the current drain as well.

The 45K pull-down is average, it can vary a lot.

Can you share the general connection ...
by commando_j
Mon Oct 28, 2019 5:51 pm
Forum: General Discussion
Topic: ESP32-WROOM Occasional reset, and then locked in bootloader WDT
Replies: 10
Views: 14819

Re: ESP32-WROOM Occasional reset, and then locked in bootloader WDT

The I2C bus can hang up.

"If the data line (SDA) is stuck LOW, the master should send nine clock pulses.The device that held the bus LOW should release it sometime within those nine clocks.If not, then use the HW reset or cycle power to clear the bus. The master I2C must be
able to generate this ...
by commando_j
Thu Oct 24, 2019 1:11 am
Forum: General Discussion
Topic: Garbage on only first lines of booloader output
Replies: 2
Views: 3812

Re: Garbage on only first lines of booloader output

Well I can see how I may have caused the issue. With old age comes bad eyes. The GND pin that I thought I connected my logic analyzer to was actually the CMD pin of the ESP32 flash on my dev kit. Now I know why I was seeing crazy garbage on my SPI pins!
SPI is better now, but I still have the ...

Go to advanced search