RP2350 Feather NeoPixel ARM Assembly Driver not Working


#1

I have an Adafruit RP2350 HSTX feather board, I’m able to control the NeoPixel on it using the NeoPixel extension .ino file ( http://www.ulisp.com/show?4GMV ) that wraps the Adafruit libraries, but not with the direct ARM Assembly ( http://www.ulisp.com/show?3NXU ), which I’d much rather use.

I have the linked file loaded, as well as version 10 of the ARM assembler, and the following configuration set (before loading the NeoPixel ARM Assembly):

(defvar *delay* 20.0)
(defvar *port-address* #xd0000000)
(defvar *outset* #x18)
(defvar *outclr* #x20)
(defvar *pin-bit* 21)
(defvar *pin* 21)

Then I run

(pinmode *pin* :output)
(neopixel *pin* '(#xff0000))

Which results in:

16711680

But the NeoPixel does not turn on. Am I missing a step?


#2

That should work. I tried it on my Adafruit RP2350 HSTX Feather board and it worked OK. I used:

  • uLisp 4.8f (although that shouldn’t make a difference).
  • CPU Architecture: ARM (clearly it won’t work in RISC-V mode).
  • CPU Speed: 150 MHz (you would have to recalculate *delay* at a different speed).

In theory you should use *pin-bit* rather than *pin* in the neopixel function, but that wouldn’t make any difference on this board because they both have the same value.

Let me know if you still can’t get it to work.


#3

I can confirm that I’m using “uLisp ARM Release 4.8”, and when I fire up the Arduino IDE it says 150 Mhz (I haven’t done anything to change it).

Thanks for the *pin* vs *pin-bit* correction, dunno where I copied that from.

Are there any debugging steps I can take? I do have access to a scope if necessary


#4

You didn’t confirm that you’ve got “CPU Architecture: ARM”, but I assume you have if you’ve not changed it.

To debug it you could check that there’s a signal on the NeoPixel’s Data Input pin when you execute:

(neopixel *pin-bit* '(#xff0000))

This is connected to pin 33 on the RP2350:

https://learn.adafruit.com/assets/132211


#5

I tested things on a second board, and the ARM Assembly NeoPixel driver is working for me there.

No idea what’s going on with the first board, I’ll follow up here if I dig into it further.

Thanks for your help!


#6

Yes, that’s puzzling. Let me know if you find out why - thanks!