Skip to content

Commit

Permalink
TintinCDKCamera: Use BLK_SIZE of 512 for bulk transfers
Browse files Browse the repository at this point in the history
The FX2 can hold up to 4 packets of 512 bytes each. The OPT9221 transfers BLK_SIZE bytes at one shot if the ready flag is set.
We need to match the USB packet size to ensure reliable data transfer.
  • Loading branch information
Anand Gadiyar committed Dec 18, 2016
1 parent 109dc80 commit 80e03b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions TI3DToF/boards/TintinCDK/TintinCDKCamera.cpp
Expand Up @@ -485,8 +485,10 @@ bool TintinCDKCamera::_init()
if (!set(TILLUM_SLAVE_ADDR, 0x72U))
return false;

if ((d.productID() == TINTIN_CDK_PRODUCT_BULK) && !set(BLK_HEADER_EN, false))
return false;
if (d.productID() == TINTIN_CDK_PRODUCT_BULK) {
if (!set(BLK_HEADER_EN, false) || !set(BLK_SIZE, 512U))
return false;
}

return true;
}
Expand Down

0 comments on commit 80e03b6

Please sign in to comment.