Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
PSOC6: Update CSP to latest #11324
Update PSoC 6 Chip Support Package and HAL to latest versions.
Pull request type
The CI failures for CY8CKIT_062_WIFI_BT and CYW943012P6EVB_01 are due to a psoc6csp change which is dependent on additional functions being provided by the BSPs. To avoid creating a circular dependency, I have revised the commit history to remove those changes from this PR and move them to #11323
kjbracey-arm left a comment
Transferring some thoughts from #11378.
The 12->16-bit scaling in cyhal_adc_read_u16 is a little bit off - it ends up just multiplying by 16, so you get an answer between 0x0000 and 0xFFF0. You could never get 1.0 from the float version.
An better and still-efficient way to increase number of bits is to do this, replicating the top nibble:
uint16_t scaled_result = (result << 4) | (result >> 8);
So 0xABC becomes 0xABCA. (And 0x000->0x0000, 0xFFF->0xFFFF).