i2s_start error in FreeRTOS SDK



  • Hi,
    I am trying to rewrite ws2812 driver with i2s in freeRTOS SDK. If I stop i2s (using i2c_stop) and then try to start i2s again using i2s_start, I get the following error:
    0_1559756032016_d94a282f-18de-46dc-9623-360e91551927-image.png
    I noticed that this is because of "configASSERT(!session.transmit_dma)" in start function in i2s.cpp.

    I was wondering why the ws2812 sample code in standalone SDK demo supports I2S and GPIO as well while ws2812 driver in FreeRtos only uses the spi?



  • Hi @xiangbingj
    I have an issue with i2c driver as well. I posted the issue couple of months ago but haven't received any response yet. I hope you can help me with this.
    I have set i2c in master mode, where slave device is connected it works fine but if I disconnect the slave device and try to read from i2c, it stays in i2c_dev_transfert_sequential forever while I expect that it exits with an error, I found that line below causes the problem:

    configASSERT(xSemaphoreTake(event_read, portMAX_DELAY) == pdTRUE && xSemaphoreTake(event_write, portMAX_DELAY) == pdTRUE);
    

    So I modified this as below:

    bool  temp = xSemaphoreTake(event_read, pdMS_TO_TICKS(500)) == pdTRUE && xSemaphoreTake(event_write, pdMS_TO_TICKS(500));
    
          dma_close(dma_write);
          dma_close(dma_read);
          vSemaphoreDelete(event_read);
          vSemaphoreDelete(event_write);
          if ( temp == pdTRUE)
            return read_buffer.size();
          else return 0;
    

    this works once but later if I call i2c read function the error below appears:

    0_1561388956539_82f51e1b-d679-488a-8b93-de355a49c310-image.png

    I need i2c works even if there is no slave device since I'm using this to detect if another peripheral is connected to my device or not. Any help in this regard is highly appreciated.



  • Thank you.


  • Staff

    Hi,We will add this function later,and inform you.