Skip to content

Instantly share code, notes, and snippets.

@vbenso
Created June 25, 2023 17:34
Show Gist options
  • Save vbenso/798c2b807821201e59966cae3da13d53 to your computer and use it in GitHub Desktop.
Save vbenso/798c2b807821201e59966cae3da13d53 to your computer and use it in GitHub Desktop.
Instructions for @cederom
Hi cederom,
I've finished the implementation of the RMT driver (at least for writing to an output pin).
Something went wrong on my rebase of the nuttX repo, and I'm going to be traveling next week.
So until I fix this issue with the pull request, you can have access to the driver in the
following branch: https://github.com/vbenso/incubator-nuttx-rmt/tree/for-cederom
I'll include the app that is used to drive the leds as well.
In my board, I'm using GPIO 4 as output pin (#define RMT_OUTPUT_PIN 4) you can change this
to whichever pin suits your case.
I've noticed an issue with wifi, if you use wifi, something the led refreshing can have an hiccup.
In that case, just increase the mem_blocks value inside the rmt_open function. The value can be as
high as 8, in my case (768 leds) mem_blocks=4 fixed all the refreshing glitches.
This is all about the rate at which the buffering IRQ is called.
Bit Period (ns) BitF(Hz) RMT Memblocks Words/IRQ s/Buffer IRQ Rate (Hz)
1250 0,00000125 800000 1 32 0,00004 25.000 FLICKERS WITH WIFI
1250 0,00000125 800000 2 64 0,00008 12.500 FLICKERS WITH WIFI
1250 0,00000125 800000 3 96 0,00012 8.333 FLICKERS WITH WIFI
1250 0,00000125 800000 4 128 0,00016 6.250 SMOOTH
@cederom
Copy link

cederom commented Jun 30, 2023

Thanks @vbenso I also came back from my trip :-)

I cannot see the RMT driver in peripheral selection neither in for-cederom nor ws2812-rmt-driver branch :-(

Al so in apache/nuttx#6992 I can see lots of unaossociated files change :-P

I will finish my qencoder driver in the first place as its the priority right now then help you out with the RMT driver :-)

Thank you for your time and work!! :-)

@vbenso
Copy link
Author

vbenso commented Jul 13, 2023

All those bad references are from an ill made rebase. That PR will be fixed, and everything will look as expected soon. Sorry for the delay. Lot's of stuff going on.

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