summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-28string compression: save a few bits per stringJeff Epler
Length was stored as a 16-bit number always. Most translations have a max length far less. For example, US English translation lengths always fit in just 8 bits. probably all languages fit in 9 bits. This also has the side effect of reducing the alignment of compressed_string_t from 2 bytes to 1. testing performed: ran in german and english on pyruler, printed messages looked right. Firmware size, en_US Before: 3044 bytes free in flash After: 3408 bytes free in flash Firmware size, de_DE (with #2967 merged to restore translations) Before: 1236 bytes free in flash After: 1600 bytes free in flash
2020-05-27make translateJeff Epler
2020-05-28Merge pull request #1 from tannewt/wdt-nrfSean Cross
Merge and a few final tweaks
2020-05-27locale: Restore translations lost in 357467022 Merge pull request #2931 ↵Jeff Epler
from tannewt/esp32s2_digitalio
2020-05-27Merge pull request #2965 from jepler/sine-wave-examplessommersoft
Various doc examples: Fix the "/ 18" copypasta bug
2020-05-27Various doc examples: Fix the "/ 18" copypasta bugJeff Epler
2020-05-27Remove NONE from mode enum and doc tweaksScott Shawcroft
2020-05-27Merge remote-tracking branch 'adafruit/master' into wdt-nrfScott Shawcroft
2020-05-27Merge pull request #2934 from hierophect/mimxrt-uart-onewayScott Shawcroft
mimxrt10xx: add one-directional UART
2020-05-27Merge pull request #2899 from dherrada/extract-typesScott Shawcroft
Added extract_types.py script
2020-05-27Merge pull request #2963 from adafruit/hiibot-bluefi-pid-fixDan Halbert
Correct HiiBot BlueFi USB_PID
2020-05-27Merge branch 'mimxrt-uart-oneway' into mimxrt-busio-cleanupLucian Copeland
2020-05-27fix submodule desyncLucian Copeland
2020-05-27more translationsLucian Copeland
2020-05-27translationsLucian Copeland
2020-05-27Merge branch 'mimxrt-uart-oneway' of ↵Lucian Copeland
https://github.com/hierophect/circuitpython into mimxrt-uart-oneway
2020-05-27Change exception text and typeLucian Copeland
2020-05-27Correct HiiBot BlueFi USB_PIDDan Halbert
Donated a PID set for HiiBot BlueFi.
2020-05-27Add pin resetting across boards, fix array size detection issueLucian Copeland
2020-05-27Better keyerror handlingdherrada
2020-05-27Merge pull request #2961 from arturo182/i2c-exceptionarturo182
mimxrt10xx: Change exception type to match other ports
2020-05-27locale: generate strings for watchdog timerSean Cross
Run `make translate` to generate strings for `shared-bindings/watchdog`. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27watchdog: use common_hal_watchdog_* patternSean Cross
This pulls all common functionality into `shared-bindings` and keeps platform-specific code inside `nrf`. Additionally, this performs most validation in the `shared-bindings` site. The only validation that occurs inside platform-specific `common-hal` code is related to timeout limits that are platform-specific. Additionally, all documentation is now inside the `shared-bindings` directory. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27watchdog: support catching the timeoutSean Cross
With this patch, the exception can now be caught: import microcontroller import watchdog import time wdt = microcontroller.watchdog wdt.timeout = 5 while True: wdt.mode = watchdog.WatchDogMode.RAISE print("Starting loop -- should exit after five seconds") try: while True: time.sleep(10) # pass # This also works for a spinloop except watchdog.WatchDogTimeout as e: print("Watchdog Expired (PASS)") except Exception as e: print("Other exception (FAIL)") print("Exited loop") This prints: Starting loop -- should exit after five seconds Watchdog Expired (PASS) Starting loop -- should exit after five seconds Watchdog Expired (PASS) Starting loop -- should exit after five seconds Watchdog Expired (PASS) Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27nrf: add ticks (not subticks) to overflow count during resetSean Cross
Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27nrf: set WDT priority to 2Sean Cross
The previous setting of `1` meant that the bluetooth system couldn't be used when the watchdog timer was enabled. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27nrf: pca10100: disable some unused features to shrink imageSean Cross
This removes some features that are largely unused in order to get the image to fit. Recommended in https://github.com/adafruit/circuitpython/pull/2933#issuecomment-632859678 Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27nrf: simmel: shrink filesystem to fit watchdog timerSean Cross
The watchdog timer has increased the amount of code and text that's required. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27nrf: port: save rtc value across rebootsSean Cross
As part of the reset process, save the current tick count to an uninitialized memory location. That way, the current tick value will be preserved across reboots. A reboot will cause us to lose a certain number of ticks, depending on how long a reboot takes, however if reboots are infrequent then this will not be a large amount of time lost. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27nrf: microcontroller: use port reset pathSean Cross
For `microcontroller.reset()`, don't manually call NVIC_SystemReset(). Instead, call the `port_reset()` in case the port wants to do any cleanup. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27watchdog: move timeout exception to shared-bindingsSean Cross
Make this exception globally available to all platforms that have enabled the watchdog timer. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27nrf: reset watchdog as part of port_reset()Sean Cross
Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27nrf: common-hal: finish reworking exceptionsSean Cross
This finishes the rework of the exception handler, which is once again stored inside the watchdog timer module. This also implements a `watchdog_reset()` that is used to disable the RAISE watchdog, if one is enabled. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27supervisor: tick: check for watchdog exception if enabledSean Cross
Check to see if the current exception is a Watchdog exception, if it's enabled. This ensures we break out of the current sleep() if a watchdog timeout hits. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27Revert "add WatchDogTimeout exception"Sean Cross
This reverts commit 561e7e619095869f58fc728d428f3ff20e8bfc40.
2020-05-27nrf: watchdog: use nrfx_wdt driverSean Cross
Instead of directly poking registers, use `nrfx_wdt`. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27nrf: boot into safe mode sometimes for watchdog resetSean Cross
If the watchdog resets the system and we're plugged into USB, boot into safe mode. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27supervisor: add a new WATCHDOG_RESET safe mode reasonSean Cross
This mode will be used if the board is reset due to the watchdog expiring. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27watchdogtimer: refactor to new apiSean Cross
This refactors the WatchDogTimer API to use the format proposed in https://github.com/adafruit/circuitpython/pull/2933#issuecomment-632268227 Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27tick: break on watchdog timeout exceptionSean Cross
Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27add WatchDogTimeout exceptionSean Cross
This adds an exception to be raised when the WatchDogTimer times out. Note that this currently causes a HardFault, and it's not clear why it's not behaving properly. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27nrf: discard arm exception sectionsSean Cross
Since these exceptions are unused, don't include them in the output binary. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27watchdog: fix documentation build errorSean Cross
Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27nrf: watchdog: implement software watchdogtimerSean Cross
This adds a software WatchDogTimer implementation that can be used for testing. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27watchdog: rename module from `wdt` and move to `microcontroller`Sean Cross
This also places it under the `microcontroller` object. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27nrf: enable wdt for all platformsSean Cross
Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27nrf: simmel: enable wdt supportSean Cross
This enables WDT support for Simmel. Other platforms cannot yet use WDT because it overflows their flash storage. Enable CIRCUITPY_WDT support for the nrf target. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27nrf: add watchdog moduleSean Cross
Add common-hal bindings to allow the watchdog module to be used on nrf platforms. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27wdt: add watchdog supportSean Cross
This adds shared bindings for a watchdog timer, based on the API provided by micropython. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27nrf: ld: add ARM.exidx to output imageSean Cross
With the WDT changes, building Circuit Python results in the following error: /opt/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: section .ARM.exidx LMA [00000000000621c8,00000000000621cf] overlaps section .data LMA [00000000000621c8,0000000000062383] This is because unwinding data is getting generated, but has nowhere to go. Re-enable this data in the linker script so it is saved. Signed-off-by: Sean Cross <sean@xobs.io>