Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Apollo3 support #204

Open
csonsino opened this issue Sep 9, 2019 · 7 comments
Open

Feature Request: Apollo3 support #204

csonsino opened this issue Sep 9, 2019 · 7 comments

Comments

@csonsino
Copy link

csonsino commented Sep 9, 2019

Would be nice to have NeoPixel support for SparkFun Artemis based boards that use the Ambiq Apollo3.

@csonsino
Copy link
Author

csonsino commented Sep 9, 2019

I wrote a quick and dirty proof of concept on the apollo3 branch at https://github.com/csonsino/Adafruit_NeoPixel, but it uses the nasty "noop" timings. Will start looking at improving the timing mechanism with interrupts, DMA, etc, but if anyone out there wants to put something together then I'd be glad to test out code.

@ladyada
Copy link
Member

ladyada commented Sep 9, 2019

PR's welcome, even if they are inelegant to start :)

@dhalbert
Copy link
Contributor

dhalbert commented Sep 9, 2019

There is an implementation in https://github.com/adafruit/circuitpython/blob/master/ports/nrf/common-hal/neopixel_write/__init__.c that uses PWM peripherals to do the timing, at the expense of using quite a bit more RAM to generate the waveforms.

@csonsino
Copy link
Author

csonsino commented Sep 9, 2019

PR posted.

I have a project that I want to port to the Artemis Nano board, but I should be able to continue working on a better timing implementation in a few days.

@ladyada
Copy link
Member

ladyada commented Sep 9, 2019

nice!

@afoxinsocks
Copy link

Hi,

Just wanted to check in on this, did you ever improve the timing implementation? I've been using your nop hack version for a few weeks and it does work, though I'd love to see this work completed and actually brought into the official NeoPixel Arduino Library.

@csonsino
Copy link
Author

csonsino commented Jan 5, 2020

I implemented a few different timing mechanisms (see my apollo3_flash_delay branch - https://github.com/csonsino/Adafruit_NeoPixel/tree/apollo3_flash_delay). You can switch between the mechanisms by uncommenting the (one) desired #define PIN_METHOD_XXX towards the top of apollo3.cpp. Something to mention is that for the PIN_METHOD_CTIMER_PWM mode, I didn't complete the mapping in apollo3PadToTimer() so only a couple of the pins will actually work.

Now for the bad news- all of my timing mechanisms suffer from the same flaw that the application basically cannot do anything other than service LEDs in the application loop. If I try to do anything else (I really want BLE functionality as well as LED control), then the LED timing gets messed up and stops working.

There is a suggested implementation over in #205 to use SPI and MOSI that might resolve the CPU timing problem, but as far as I know nobody has had the time to work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants