K210是否支持RGB888格式输入



  • 我想利用K210作为神经网络加速器用于工业检测,通过FPGA输入图像给K210,预采用RGB888格式,RGB565图像精度损失太大,不适于本项目。请问:是否支持RGB888格式输入,或者有没有其他接口能输入?谢谢



  • Perhaps you will give an example of the correct SPI settings for data entry in 8-wire mode? MISO <- SPI_FF_OCTAL.

    What I checked is working. But with an increase in the frequency or amount of data received, the SPI-driver goes into an infinite rxflr waiting cycle (SPI Receive FIFO Level Register).

    With spi_set_clk_rate (0, 50000000) and SPI_FF_OCTAL, the maximum number of received bytes is 38. Probably, I have a wrong code, there is success data above with 100MByte/s.

    // kendryte-standalone-sdk: develop
    
    // init:
    fpioa_set_function(SPI_MASTER_CLK_PIN, FUNC_SPI0_SCLK);
    fpioa_set_function(SPI_MASTER_MISO_PIN,  FUNC_SPI0_D0);
    fpioa_set_function(SPI_MASTER_MISO2_PIN, FUNC_SPI0_D1);
    fpioa_set_function(SPI_MASTER_MISO3_PIN, FUNC_SPI0_D2);
    fpioa_set_function(SPI_MASTER_MISO4_PIN, FUNC_SPI0_D3);
    fpioa_set_function(SPI_MASTER_MISO5_PIN, FUNC_SPI0_D4);
    fpioa_set_function(SPI_MASTER_MISO6_PIN, FUNC_SPI0_D5);
    fpioa_set_function(SPI_MASTER_MISO7_PIN, FUNC_SPI0_D6);
    fpioa_set_function(SPI_MASTER_MISO8_PIN, FUNC_SPI0_D7);
    fpioa_set_function(SPI_MASTER_CS_PIN, FUNC_SPI0_SS0);
    
    spi_set_clk_rate(0, 50000000);
    
    // main:
    spi_init(SPI_DEVICE_0, SPI_WORK_MODE_0, SPI_FF_OCTAL, 8, 0);
    size_t len = 38; 
    uint8_t data_buf[len];
    spi_receive_data_standard(SPI_DEVICE_0, SPI_CHIP_SELECT_0, NULL, 0, data_buf, len);
    printf("Recive successful"); //  if len > 38 we will not get here

  • Staff

    @zenglin_whu 不算低,我们自己用FPGA实测往OSPI0/OSPI1单向灌输据能跑出比DVP高得多的速率。100MByte/s(800Mbit/s)是没问题的。



  • @latyas spi速率太低了


  • Staff

    请用FPGA给OSPI0或者OSPI1灌数据,这样能直接灌RGB888数据


  • Staff

    不支持, DVP 只能支持到 RGB565, 可以从 SPI 输入数据