Skip to content

BSX-RTC "Run" LED.#12

Open
Bowlsnapper wants to merge 2 commits intoTeam-Resurgent:mainfrom
Bowlsnapper:main
Open

BSX-RTC "Run" LED.#12
Bowlsnapper wants to merge 2 commits intoTeam-Resurgent:mainfrom
Bowlsnapper:main

Conversation

@Bowlsnapper
Copy link

Adds support for the "Run" LED when time is programmed onto the RTC over I2C, indicating that the clock is set and running.

@EqUiNoX-Labs
Copy link
Contributor

EqUiNoX-Labs commented Jan 24, 2025

@Bowlsnapper

Hi, can you please explain in a bit more detail why this is needed please?

My understanding is the squarewave gen is nothing to do with the clock?

Does the led drain the battery with xbox off?

What happens if user turns off xbox and back on?

@Bowlsnapper
Copy link
Author

Bowlsnapper commented Jan 25, 2025

@Bowlsnapper

Hi, can you please explain in a bit more detail why this is needed please?

My understanding is the squarewave gen is nothing to do with the clock?

Does the led drain the battery with xbox off?

What happens if user turns off xbox and back on?


@EqUiNoX-Labs

Hi! Thank you for asking! :)

The purpose of the square wave is to indicate when the BSX-RTC (X-RTC) clock has been successfully programmed by PrometheOS and the mod is functioning properly. I think this will be helpful for installs and for some people to feel comfortable that the mod has been performed correctly, with the device functioning as intended. I understand that PrometheOS states elsewhere in the menu whether the RTC is detected or not, but the LED provides a strong, direct visual reference. It also blinks once per second (1Hz, or once every second, just as the colons on a clock will blink), which is the usual indicator of when a clock is running. This is visible through the side vent so it is, at the very least, kinda' cool looking. :)

The LED is powered by the 3.3V powering the DS3231. So It will run as long as there is power supplied to the mod from the motherboard. If the 5V 1.6 standby power is used, the 3.3V comes from the LDO. If the 3.3V standby power is used (1.0-1.4), then it basically bypasses the VREG and goes straight to the LED and accompanying resistor. Since the square wave generator is open-drain, the Run LED is powered solely with ATX standby power, which is only present when the console is plugged in. If motherboard power is removed and the battery takes over, the Run LED does not have power supplied to it. The battery simply runs the RTC IC, which draws so little power, it can last for several years. If the Xbox is powered down with power supplied, the Run LED will continue to blink, running off motherboard standby power. Powering on should not do anything. The only thing that happens is the programming of the generator output when the time is set in PrometheOS.

It would be very, very cool to have official support for this. I have tested the clock fully and it works just the way it should. RTC is detected in PrometheOS and keeps time when AC mains is removed.

https://youtube.com/shorts/XdOQcOq243E?feature=share

https://i.postimg.cc/05BCPGxX/PXL-20250123-002425065.jpg
https://i.postimg.cc/CKsNgWLb/PXL-20250124-030944294.jpg
https://i.postimg.cc/mrswKbRb/PXL-20250124-031137832.jpg
https://i.postimg.cc/kGN7C053/PXL-20241027-155327583-1.jpg

writeByte(5, COMPOSE_DATE_VALUE(utcSystemTime.wMonth));
writeByte(6, COMPOSE_DATE_VALUE(utcSystemTime.wYear % 100));

writeByte(0x0E, SQW_1HZ_MODE); // Set square wave output to 1Hz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably read the value from register then mask out frequency bits then logical or SQW_1HZ_MODE

Copy link
Contributor

@EqUiNoX-Labs EqUiNoX-Labs Jan 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After careful consideration, at this moment we have decided not to merge in this feature, we suggest that you maintain a fork of which you can pull in latest changes as and when.

We also suggest in your fork, that Specific functions to BSX should be wrapped around a #ifdef BSX which will help highlight board specific changes.

Copy link
Author

@Bowlsnapper Bowlsnapper Jan 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate your feedback and your consideration. Thank you for the advice. I will take it into account and will try to compile a version for myself with better and more efficient code than the experimental code I am messing with, which is only a few lines. I will edit my additions to be more thorough and to sync in time with the time that is stored and running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants