NeoPXL8 Library on RP2040 does not stop state machine on destruction

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Blish
 
Posts: 7
Joined: Sun Mar 19, 2023 10:18 pm

NeoPXL8 Library on RP2040 does not stop state machine on destruction

Post by Blish »

Hello,

I'm using the NeoPXL8 library on an RP2040, and when the Adafruit_NeoPXL8 object is destructed, the PIO state machine is not properly stopped. I.E. pio_sm_set_enabled(... false) is not called, nor is pio_sm_unclaim(...) and pio_remove_program(...) called. Am I missing something here?

Thanks,
Marcus

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: NeoPXL8 Library on RP2040 does not stop state machine on destruction

Post by mikeysklar »

This is the Arduino library Adafruit_NeoPXL8 not the CircuitPython one that you are using?

I do not see an issue open on this would you like to create one?

https://github.com/adafruit/Adafruit_NeoPXL8/issues

User avatar
Blish
 
Posts: 7
Joined: Sun Mar 19, 2023 10:18 pm

Re: NeoPXL8 Library on RP2040 does not stop state machine on destruction

Post by Blish »

Will do.

I will also create an issue for "instantiates a NeoPixel object which claims an unnecessary state machine"

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: NeoPXL8 Library on RP2040 does not stop state machine on destruction

Post by pburgess »

Can confirm, it does not release all resources properly. Didn’t see a use case at the time, figured the light show would always be running…but if there’s a situation that calls for it, I’ll see about fixing that.

User avatar
Blish
 
Posts: 7
Joined: Sun Mar 19, 2023 10:18 pm

Re: NeoPXL8 Library on RP2040 does not stop state machine on destruction

Post by Blish »

NeoPixel issue:
https://github.com/adafruit/Adafruit_Ne ... issues/351

This is in reference to the locked thread located here:
viewtopic.php?t=199942
Last edited by Blish on Wed Mar 22, 2023 1:33 am, edited 1 time in total.


User avatar
Blish
 
Posts: 7
Joined: Sun Mar 19, 2023 10:18 pm

Re: NeoPXL8 Library on RP2040 does not stop state machine on destruction

Post by Blish »

PR#11 created for Issue #10

User avatar
Blish
 
Posts: 7
Joined: Sun Mar 19, 2023 10:18 pm

Re: NeoPXL8 Library on RP2040 does not stop state machine on destruction

Post by Blish »

PR#352 created for Issue #351.

This is in reference to the locked thread located here:
viewtopic.php?t=199942

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”