Issue #438: Fixes for Arduino Nano 33 BLE. #447
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes code that was intended to support the Arduino Giga R1 boards; however, its integration into the codebase broke the Arduino Nana 33 BLE devices and possibly other ARM M4 device. The problematic macro was the use of
defined(TARGET_M4)which unintentionally assumed all ARM M4 chips are using a 240MHz clock. The Nano 33 BLE boards have a ARM M4 at their core but run at a much lower clock rate. In addition the Nano 33 BLE boards use a different mechanism to control the GPIO (see NRF52 code in Adafruit_NeoPixel.cpp starting at line 2169) which was not used due to the mentioned macro.Arduino Giga R1 support is already in the codebase (see Adafruit_NeoPixel.cpp line 3136 and other lines) which the macro
defined(TARGET_GIGA) || defined(TARGET_M4)bypassed due to its placement in the file as well.With the proposed changes, the Arduino Nano 33 BLE board has been tested. The Arduino Giga R1 code has been verified to compile correctly and include the correct code (i.e.
defined(ARDUINO_ARCH_MBED_GIGA)); however, has not been verified on target due to lack of a Giga R1 board.