Skip to content

Commit

Permalink
Fix working on ESP32-S3 (#8)
Browse files Browse the repository at this point in the history
Disable brown-out detector in a more correct way: clear only enable bit instead of clearing the whole register.

---------

Co-authored-by: Oleg Kalachev <okalachev@gmail.com>
  • Loading branch information
Zatupitel and okalachev committed Feb 28, 2025
1 parent dbfbe11 commit 2b15812
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion flix/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ void printArray(T arr[], int size) {

// Disable reset on low voltage
void disableBrownOut() {
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0);
REG_CLR_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ENA);
}
1 change: 1 addition & 0 deletions gazebo/soc/soc.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Dummy file to make it possible to compile simulator with Flix' util.h

#define WRITE_PERI_REG(addr, val) {}
#define REG_CLR_BIT(_r, _b) {}

0 comments on commit 2b15812

Please sign in to comment.