• Yes, it is enabled, there are also board files used to build it in https://github.com/fanoush/ds-d6/tree/ma­ster/espruino/DFU/P8 and there is USE_LCD_SPI_UNBUF=1 inside, for the InlineC driver try upload example from this gist (also linked in readme). It should now work also with build with storage in SPI flash.

    I actually didn't try lcd_spi_unbuf with the storage it SPI flash, quite likely it may not work out of box due to shared SPI, so for comparison better take version with storage in internal flash (the one without _SPIFLASH suffix) which is still good enough unless your code is over 120KB.

    If the guide in readme is confusing also check https://github.com/enaon/ninebot-one-nRF­52/tree/master/p8-nb

  • Thanks, I managed to get my P8 flashed with Espruino with no problems. I did the following measurements for the Lcd_spi_unbuf driver.

    I compared the time taken to fill a 240 x 160 pixel rectangle with the time to draw a 240 x 160 1 bit image. I include the results for Bangle and ESP32 (T-watch for comparison.

    RESULTS

    Bangle: fillRect 11ms, drawImage 66ms.

    ESP32: fillRect 44ms, drawImage 82ms.

    P8: fillRect 256ms, drawImage 331ms.

    The speed is not great, however, its is worth noting that the issue is not rendering palleted images but it is simply getting pixels sent to the driver. There are at least two improvements I can think of:

    1) The buffer at 128 (256 bytes) is nearly exactly the wrong size as the implementation of spiSendMany uses EasyDMA with a maximum transfer size of 255 bytes i.e. the current buffer size causes two transfers, the second of 1 byte. I would like to try a buffer size of 240 (480 bytes).

    2) spiSendMany is currently used synchronously in spiSendMany so it would be interesting to try double buffering to speed things up.

    I would really like to be able to build the firmware to test this and also to add a Bluetooth hack to support my ANCS widget. I see that you have made the board description public but I would guess that you also need the other files (bootloader etc) to build it?

    Thanks agian for making the package available - the P8 has a bright display and its good to experiment with the touchscreen. I found it really easy to transfer the apps I have been running on the T-watch to the P8. Will share when I clean things up.

    function time_fill(){
        g.setColor(0x07E0);
        var time= Date.now();
        g.fillRect(0,40,239,199);
        g.flip();
        time = Math.floor(Date.now()-time);
        console.log("Time to Draw Rectangle: "+time+"ms");
    }
    
    var pal1color = new Uint16Array([0x0000,0xF100]);
    var buf = Graphics.createArrayBuffer(240,160,1,{ms­b:true});
    buf.setColor(1);
    buf.fillRect(0,0,239,159);
    
    function time_image(){
        var time= Date.now();
        g.drawImage({width:240,height:160,bpp:1,­buffer:buf.buffer, palette:pal1color},0,40);
        g.flip();
        time = Math.floor(Date.now()-time);
        console.log("Time to Draw Image: "+time+"ms");
    }
    
  • P8: fillRect 256ms, drawImage 331ms.

    Did you test also g.flip of my driver? should be below 100ms for full 240x240 screen

    I see that you have made the board description public but I would guess that you also need the other files (bootloader etc) to build it?

    It is built with nordic SDK11 so you need just that, but I have it slightly patched, you can get
    targetlibs_nrf5x_11.tgz from https://github.com/fanoush/ds-d6/tree/ma­ster/espruino and extract this in Espruino folder and build with make -j BOARD=P8-SDK11 RELEASE=1 DFU_UPDATE_BUILD=1. No bootloader needed, you already have it.
    Only recently there is new i2c slave code that modifies sdk12 so for now easiest for building with SDK11 is to edit makefile and remove this line with nrf_drv_twis.c otherwise it breaks with error that no slave devices are enabled.

    SDK11 because there is a bit more flash and variables available and also because arduino environment is SDK11 too so it is easier to switch between them then. However with storage in spi flash there is also good reason to move to SDK12 as other espruino devices to simplify builds so I'll make softdevice+bootlader upgrade package to move it to SDK12 too.

About

Avatar for jeffmer @jeffmer started