Comments (4)
You can find the ADC_GetCurrentTS function at the end of the ch58X_adC.c file to convert temperature values:
https://github.com/openwch/ch583/blob/main/EVT/EXAM/SRC/StdPeriphDriver/CH58x_adc.c#L214-L232
from ch583.
thank you! missed that!
from ch583.
I've been looking more at this, and I'm afraid I've just got more questions :) I can change the temperature of my ch582m device, and see the temp sensor raw readings go up and down, so I'm confident that it works but getting a real number out of it is... not so obvious. for ~ambient ~24°C, the linked function is giving me -36°C. I've also tried the function at https://github.com/openwch/ch583/blob/main/Application/wristband/firmware/Demo_Firmware/StdPeriphDriver/CH58x_adc.c#L163-L172 which produces different (still "wrong") values. (That function needs a cast to int on C25
otherwise nothing under 25°C is calculated properly anyway)
I've plotted the full range of values these functions generate, and they've giving quite different slopes, but still, it's just two linear equations. What is the value in in ROM_CFG_TMP_25C meant to be giving us? an offset? or a slope? If it's a slope, we need more information, because the two formulas given are both wrong anyway. If it's an offset, we need to be told the constant slope.
here's plotting the values generated by both functions for the ROM_CFG_TMP_25C value on my own board:
from ch583.
@Hikari-ky @zerosensei Would be lovely to get better support from WCH – the chips are really nice, but the (English) documentation and support is still lacking.
from ch583.
Related Issues (17)
- Repository is named ch582 but files say CH583 HOT 1
- CAN you Add Rt-Thread Project? HOT 1
- R8_PLL_CONFIG and R8_FLASH_CFG are undocumented
- BLE is undocumented HOT 1
- RTC wakeup example for PM demo HOT 2
- Connectecd ADV mode HOT 2
- Bricked the BLE functionality of my dev board HOT 2
- Bluetooth 5 Extended Advertisements HOT 4
- BLE and timer capture HOT 1
- cannot find -lCH58xBLE HOT 1
- CTE extension on ch582 HOT 6
- Using with lora radio HOT 1
- Schematic for CH582F HOT 1
- CH582M won't work at system frequency 2 MHz and lower
- CH582M Wont enter bootloader download mode anymore (exam BLE/HID_Keyboard) HOT 5
- Information Request: BLE & USB certifications HOT 1
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 ch583.