Configuring Buffer Sizes in AN75779 UVC Firmware – KBA90744

Version: **

 

Question: What are the changes required when the DMA channel buffer size is changed in the UVC example project of AN75779?

 

Answer:

 

Make the two additional changes in the firmware to accommodate the new DMA buffer size:

  •   Change the LD_DATA_COUNT and LD_ADDR_COUNT values according to this equation:  

       Count = ((producer_buffer_size)/(data_bus_width))-1

     

       Where

     

       producer_buffer_size = DMA_buf_size – header – footer

     

       All values are in bytes.

  •   In the firmware, in the uvc.c file, change the last member of the glProbeCtrl and glProbeCtrl20 arrays to equal the buffer size from the default value of 16k.