Have you viewed the Spresense developer manuals?

Cameron R MANN
@Cameron R MANN
Best posts made by Cameron R MANN
-
RE: Hardware SPI not working for ILI9340/9341 TFT Display - SW SPI Does...
It works! Edited Adafruit_ILI9341.cpp to isolate the changes to ILI9341 only. Saved all files and re-ran the example successfully. Very good information going forward.
As soon as I read "SPI_MODE....." I facepalmed myself. I debugged an issue with an ADC not too long ago and this was the issue, SPI clock polarity/phase. Even dragged out the logic analyzer on that problem, and observed the bits were shifted....phasing issue. Probably the same road I would have taken to investigate this.
Thanks Karl!
-
RE: Writing directly to image Framebuffer - Spresense SDK
@TE-KarlKomierowski
I enabled the DMA option as you suggested, but I did not notice any change to the severity of the flickering. I also checked ILI9340_SPI_MAXFREQUENCY and it was set to 40000000 just as your example.I agree regarding the NX graphics + framebuffer usage. No sense in re-inventing the wheel. Now that I have discovered a "hook" into the framebuffer, the NX documentation might make a little more sense. I will revisit and research a bit more.
I will definitely keep this thread updated...I also think it is an important dev topic and worth digging into. Stay tuned!
Latest posts made by Cameron R MANN
-
RE: Writing directly to image Framebuffer - Spresense SDK
@TE-KarlKomierowski
I enabled the DMA option as you suggested, but I did not notice any change to the severity of the flickering. I also checked ILI9340_SPI_MAXFREQUENCY and it was set to 40000000 just as your example.I agree regarding the NX graphics + framebuffer usage. No sense in re-inventing the wheel. Now that I have discovered a "hook" into the framebuffer, the NX documentation might make a little more sense. I will revisit and research a bit more.
I will definitely keep this thread updated...I also think it is an important dev topic and worth digging into. Stay tuned!
-
RE: Writing directly to image Framebuffer - Spresense SDK
Karl:
Yes I am using the ILI934x (I omitted that detail). From reading the NuttX docs I also had the "impression" I could write to the display directly or via a framebuffer, but there didn't seem to be much detail / use examples.I have not examined/used the DMA options, nor adjusted the SPI frequency - I will definitely try those out...thanks for the tip!
Side Note: Presently I am modifying the "image" array/buffer in the camera_bkgd.c source file (found in line 234):
https://github.com/sonydevworld/spresense/blob/master/examples/camera/camera_bkgd.cI've been able to increment the address and write 0xFFFF to several locations, drawing a white line across the screen. As I expected, the line itself does not flicker when overlaid across the camera stream, while my NuttX graphic primitive continues to "flicker" (redrawn). I would say it is good progress, but I was uncertain if this is the "correct" approach to my problem. I will continue to investigate the usability/stability of this method.....
-
Writing directly to image Framebuffer - Spresense SDK
I am overlaying data on the camera stream using the NuttX graphics API, and I am running into the basic problem of a flickering graphics overlay. Clearly the NuttX graphics routines are being overwritten by the next video frame, and Spresense can't write fast enough to make this less noticeable. Does anyone know of a good way to access the Spresense framebuffer directly? If I had this level of access I could write my own routines and sidestep NuttX graphics.
I've spent some time with the NuttX graphics manual, and have tried some "sketchy" approaches at modifying the buffer/array directly with some minor success, albeit with doubtful stability. Any ideas out there?
-
RE: NuttX Camera Example Configuration Options Missing
Thanks Karl! I will give it a try....
-
RE: NuttX Camera Example Configuration Options Missing
Update: I was able to run the NuttX camera example successfully the other day. Key points below, when using the tools/config.py -m menu:
-- Ensure LCD SPI is selected in the Board Configuration menu
-- Ensure the LCD Drivers, Video Device Support (camera), & Video Support drivers are selected in the Drivers menu
-- Read through all the driver options in the menu! It is a useful exercise....Those notes may seem rudimentary, but I missed a few of those configuration options. Note I abandoned configuring the camera example using the command line (RE: issues in the first post). Also, I was able to successfully modify the camera example so that I have a simple "full speed" 320x240 video stream on the LCD.
FWIW I don't consider the original post resolved, however I am no longer roadblocked....
-
RE: How to set the initial NuttX kernel configuration
Try the solution from Kamil, in my thread about WIN10+Msys. You appear to have the same error message I did.
-
RE: NuttX Camera Example Configuration Options Missing
Update: I built/ran the NuttX "Hello World" graphics example successfully using my LCD, so at this time I am confident the hardware is connected & functioning correctly:
https://github.com/sonydevworld/spresense/tree/master/examples/nxhello
FYI I also used the graphical/menu based configuration utility to setup the nxhello demo.
-
NuttX Camera Example Configuration Options Missing
Referencing: https://github.com/sonydevworld/spresense/tree/master/examples/camera/
While working through the camera example, with the intention of sending the image/video data to my ILI9340(41) LCD, I noticed the following options were not present in the "camera-defconfig" file:
CONFIG_EXAMPLES_CAMERA_OUTPUT_LCD=y CONFIG_LCD_ON_EXTENSION_BOARD=y CONFIG_LCD_ON_MAIN_BOARD=y
Despite this, I added the missing configuration options in camera-defconfig (note I am using the extension board and omitted the param for the MAIN board). I then built, flashed, and ran the example. I did not receive output to my LCD, however Spresense wrote several "VIDEOxxx.YUV" files to the SD card (as would be expected if I didn't have an LCD). I can't say the example failed, it just did not operate per my expectations.
My wiring is below, and has not changed from my (successfully) testing with the Arduino LCD+camera examples:
Wiring: Display => Spresense:
DC -> 9
RST -> 8
CS -> 10
MOSI -> 11
MISO -> 12
SCK -> 13(Display): https://www.adafruit.com/product/1480
Any ideas as to how I can run this example with LCD output?
-
RE: WIN10 + MSYS Issue: Setting NuttX & SDK Configuration Fails after Dev Machine Reboot
@KamilTomaszewski: Your instructions resolved the issue. I can now build within MSYS without error