Comments (2)
I(actually our team) develop two editions of the IoT devices with SPRESENSE.
The version A uses onboard RTC and the version B should use external one.
But I don't want to release two firmware binaries for each editions(for costs!).
So I want to switch RTCs in a same firmware by EEPROM, status of GPIO, etc.
Do you have any good ideas?
from spresense.
@takumiando san
As the incubator-nuttx issue comment, arch_rtc.c
is introduced very later, and is not used by Spresense.
Spresense is using drivers/timers/rtc.c
as the upper-half driver.
And, the lower-half driver is implemented in cxd56_rtc_lowerhalf.c
using the chip-internal RTC.
graph TD;
drivers/timers/rtc.c-->cxd56_rtc_lowerhalf.c;
cxd56_rtc_lowerhalf.c-->cxd56_rtc.c;
If you want to switch RTC device drivers via /dev/rtc
,
you can implement another external lower-half driver
and switch the lower-half driver to register with rtc_initialize()
.
graph TD;
drivers/timers/rtc.c-->cxd56_rtc_lowerhalf.c;
cxd56_rtc_lowerhalf.c-->cxd56_rtc.c;
drivers/timers/rtc.c-->External_lowerhalf_driver;
On the other hand, up_rtc_xxx()
functions are also used from sched/clock
.
I think that even in cases where an external RTC is used, sched/clock
can continue to use the internal RTC.
If you want to also switch the RTC used from sched/clock
, the up_rtc_xxx
function will be conflicted as you know.
It may be easier to dynamically switch between RTC internal or external on the up_rtc_xxx()
functions.
from spresense.
Related Issues (20)
- The revision nuttx-tools written at README.md fails "tools/config.py examples/hello" HOT 3
- Can't get code to compile on Mac M1 HOT 3
- Using the code with sensor data as model input HOT 2
- Issue with SDK getting stated guide HOT 1
- Hard-coding /bin/bash on macOS will use the ancient bundled version
- build_env.sh source error HOT 2
- Unable to run spresense SDK example "bluetooth_le_central" with bluetooth module HM-10 HOT 1
- Better OpenOCD config HOT 1
- Why should we enable power_button pin of alt1250? HOT 3
- gs2200m association failed : retrying : multiwebcam HOT 2
- Unable to setup SDK CLI for windows 10 HOT 8
- Are there micro SD cards that work and micro SD cards that don't?
- How can I setup spresense board with RFID module. HOT 2
- The SDK example fsperf not working. HOT 2
- Audio subsystem Memory manager compatibility with malloc(). HOT 2
- LTE fails to initialize after reboot by watchdog timer HOT 1
- assert() cannot be used in expression context HOT 2
- Makefiles broken on Windows/MSYS HOT 1
- AAC codec? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spresense.