Comments (6)
LaZsolt saves the day :)
from lgt8fx.
Hi Guglielmo!
Try this version of the code:
static void begin() __attribute__((always_inline)) {
uint8_t btmp = PMCR | (1 << RCMEN); // 0000 0001 (enable RCMEN)
btmp = btmp & ~(1 << RCKEN); // 1111 1101 (disable RCKEN)
btmp = btmp & ~(1 << WCLKS); // 1110 1111 (select HFRC)
PMCR = (1 << PMCE); // 1000 0000
PMCR = btmp;
}
from lgt8fx.
Hi, thanks, this is actually the correct way to write what I wanted to do. :-D
Unfortunately, however, the result does not change and the WDT continues to operate following the LFRC :-(
Guglielmo
from lgt8fx.
ATM I don't have time to test but here is an another idea:
.
.
.
#include <WDT.h>
LGTWDT Lgtwdt;
void setup() {
Lgtwdt.begin();
.
. your code
.
from lgt8fx.
This seems to be the solution ...
... by explicitly calling the begin() method, everything seems to work. Thanks for your help !!!
Guglielmo
from lgt8fx.
Your welcome.
from lgt8fx.
Related Issues (20)
- StLink v2 HOT 1
- NO SSL for json file HOT 7
- EEPROM library on logging principle (from STM32) HOT 10
- Problems with burning the bootloader HOT 14
- Cannot compile HOT 6
- [SOLUTION] Compilation error
- The WDT issue. HOT 11
- lgt8fx - Boards Manager Menu error / quirk - for Internal 16MHz / 32MHz HOT 27
- Lgt8fx - ADC analogRead() is wrong - it only returns back 10bit - need to load manually ADCH + ADCL to get 12bit value HOT 2
- FastIO will not accept defined constants HOT 3
- Internal clock speeds less than 32MHz no longer available since version 2.0.3. HOT 3
- voltage and current on pins when MCU in LowPower.deepSleep2 HOT 1
- standbyExternalInterrupt example does not consistently work HOT 1
- I am using emonlib with arduino then it is working HOT 2
- LGT8F328P program size HOT 6
- E2PROM HOT 8
- How to burn booloader HOT 2
- Won't flash using IDE 2.2.1 HOT 38
- DSP1 not working correctly with example code from lgt_LowPower library HOT 10
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 lgt8fx.