diff options
author | Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> | 2024-03-05 01:28:12 -0300 |
---|---|---|
committer | Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> | 2024-03-08 06:50:16 -0300 |
commit | 592e18bf0eabfa0dd37a53ce66de5ca29ceef747 (patch) | |
tree | 55e3daff7a2387f7494d4039bec93ce2c486f1ef /movement | |
parent | a4ee7dd7fc1bce954b0afc9a2a56fdda2b86b501 (diff) | |
parent | a2a60eb31a9bd8990705d4799406697bc9b0888f (diff) | |
download | Sensor-Watch-592e18bf0eabfa0dd37a53ce66de5ca29ceef747.tar.gz Sensor-Watch-592e18bf0eabfa0dd37a53ce66de5ca29ceef747.tar.bz2 Sensor-Watch-592e18bf0eabfa0dd37a53ce66de5ca29ceef747.zip |
Merge branch 'silicon-errata' into advanced
Implements the recommended workarounds for numerous silicon errata,
reducing power consumption and preventing freezes and hard faults.
Tested-by: Alex Maestas <git@se30.xyz>
Tested-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Tested-on-hardware-by: Alex Maestas <git@se30.xyz>
Tested-on-hardware-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Reviewed-by: Wesley Aptekar-Cassels <me@wesleyac.com>
Reviewed-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Signed-off-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/340
GitHub-Related-Issue: https://github.com/joeycastillo/Sensor-Watch/issues/361
GitHub-Related-Issue: https://github.com/joeycastillo/Sensor-Watch/issues/359
Reference: https://ww1.microchip.com/downloads/aemDocuments/documents/MCU32/ProductDocuments/Errata/SAM-L22-Family-Silicon-Errata-and-Data-Sheet-Clarification-DS80000782.pdf
Diffstat (limited to 'movement')
-rw-r--r-- | movement/watch_faces/complication/randonaut_face.c | 2 | ||||
-rw-r--r-- | movement/watch_faces/complication/toss_up_face.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/movement/watch_faces/complication/randonaut_face.c b/movement/watch_faces/complication/randonaut_face.c index bca334fb..3bbc147f 100644 --- a/movement/watch_faces/complication/randonaut_face.c +++ b/movement/watch_faces/complication/randonaut_face.c @@ -357,7 +357,7 @@ static uint32_t _get_true_entropy(void) { while (!hri_trng_get_INTFLAG_reg(TRNG, TRNG_INTFLAG_DATARDY)); // Wait for TRNG data to be ready - hri_trng_clear_CTRLA_ENABLE_bit(TRNG); + watch_disable_TRNG(); hri_mclk_clear_APBCMASK_TRNG_bit(MCLK); return hri_trng_read_DATA_reg(TRNG); // Read a single 32-bit word from TRNG and return it #endif diff --git a/movement/watch_faces/complication/toss_up_face.c b/movement/watch_faces/complication/toss_up_face.c index 08dd0052..cf6ca680 100644 --- a/movement/watch_faces/complication/toss_up_face.c +++ b/movement/watch_faces/complication/toss_up_face.c @@ -255,7 +255,8 @@ uint32_t get_true_entropy(void) { while (!hri_trng_get_INTFLAG_reg(TRNG, TRNG_INTFLAG_DATARDY)); // Wait for TRNG data to be ready - hri_trng_clear_CTRLA_ENABLE_bit(TRNG); + watch_disable_TRNG(); + hri_mclk_clear_APBCMASK_TRNG_bit(MCLK); return hri_trng_read_DATA_reg(TRNG); // Read a single 32-bit word from TRNG and return it #endif |