From 89e86fe6294948df0ca8aade93e9893f317dd5fc Mon Sep 17 00:00:00 2001 From: Alex Maestas Date: Sun, 17 Dec 2023 17:39:59 +0000 Subject: work around silicon erratum in TRNG --- watch-library/shared/watch/watch.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'watch-library/shared') diff --git a/watch-library/shared/watch/watch.h b/watch-library/shared/watch/watch.h index 790f9a16..4043fdf7 100644 --- a/watch-library/shared/watch/watch.h +++ b/watch-library/shared/watch/watch.h @@ -96,4 +96,8 @@ void watch_reset_to_bootloader(void); */ int read(int file, char *ptr, int len); -#endif /* WATCH_H_ */ \ No newline at end of file +/** @brief Disables the TRNG, working around a silicon erratum. + */ +void watch_disable_TRNG(Trng* hw); + +#endif /* WATCH_H_ */ -- cgit v1.2.3 From 93d7f38d6797f3a145b87964f4c6aa522b513037 Mon Sep 17 00:00:00 2001 From: Alex Maestas Date: Sun, 17 Dec 2023 22:40:04 +0000 Subject: fix simulator build by declaring Trng type as a void pointer --- watch-library/shared/watch/watch.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'watch-library/shared') diff --git a/watch-library/shared/watch/watch.h b/watch-library/shared/watch/watch.h index 4043fdf7..8ede1f63 100644 --- a/watch-library/shared/watch/watch.h +++ b/watch-library/shared/watch/watch.h @@ -96,6 +96,10 @@ void watch_reset_to_bootloader(void); */ int read(int file, char *ptr, int len); +#ifdef __EMSCRIPTEN__ +typedef void* Trng; +#endif + /** @brief Disables the TRNG, working around a silicon erratum. */ void watch_disable_TRNG(Trng* hw); -- cgit v1.2.3 From 83a0e4e992388e6aaba9390cc1212649ae44d239 Mon Sep 17 00:00:00 2001 From: Alex Maestas Date: Mon, 22 Jan 2024 00:30:25 +0000 Subject: annotate TRNG erratum, address review comment --- watch-library/shared/watch/watch.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'watch-library/shared') diff --git a/watch-library/shared/watch/watch.h b/watch-library/shared/watch/watch.h index 8ede1f63..d23954ec 100644 --- a/watch-library/shared/watch/watch.h +++ b/watch-library/shared/watch/watch.h @@ -96,12 +96,8 @@ void watch_reset_to_bootloader(void); */ int read(int file, char *ptr, int len); -#ifdef __EMSCRIPTEN__ -typedef void* Trng; -#endif - -/** @brief Disables the TRNG, working around a silicon erratum. +/** @brief Disables the TRNG twice in order to work around silicon erratum 1.16.1. */ -void watch_disable_TRNG(Trng* hw); +void watch_disable_TRNG(); #endif /* WATCH_H_ */ -- cgit v1.2.3