-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSOC6: Update CSP to latest #11324
PSOC6: Update CSP to latest #11324
Conversation
@kyle-cypress, thank you for your changes. |
CI started |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
2873555
to
977eb83
Compare
@ARMmbed/mbed-os-maintainers This one should go first (see how many PRs depend on this one , above referenced) |
CI restarted |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
Update HAL adapter for interface changes Misc minor fixes to HAL adapter
141742e
to
8ad377a
Compare
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 |
CI restarted |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
@kyle-cypress Can you update dependencies now and let us know which one is readY? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Transferring some thoughts from #11378.
Also:
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).
@@ -51,7 +51,7 @@ void analogout_write_u16(dac_t *obj, uint16_t value) | |||
|
|||
float analogout_read(dac_t *obj) | |||
{ | |||
return 100.0f / UINT16_MAX * analogout_read_u16(obj); | |||
return analogout_read_u16(obj) / UINT16_MAX; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This almost always returns 0, as it's integer division. Should be
return analogout_read_u16(obj) * (1.0f / UINT64_MAX);
(Multiplication by reciprocal will be more efficient than actual FP division).
Same maths should be used in analogin_read
.
Replace with multiplication by the floating point reciprocal, to produce a floating point result while being more efficient than floating point division. Addresses the issue raised by kjbracey-arm in ARMmbed#11324 (review)
Replace with multiplication by the floating point reciprocal, to produce a floating point result while being more efficient than floating point division. Addresses the issue raised by kjbracey-arm in ARMmbed#11324 (review)
Replace with multiplication by the floating point reciprocal, to produce a floating point result while being more efficient than floating point division. Addresses the issue raised by kjbracey-arm in ARMmbed#11324 (review)
Replace with multiplication by the floating point reciprocal, to produce a floating point result while being more efficient than floating point division. Addresses the issue raised by kjbracey-arm in #11324 (review)
Replace with multiplication by the floating point reciprocal, to produce a floating point result while being more efficient than floating point division. Addresses the issue raised by kjbracey-arm in #11324 (review)
Description
Update PSoC 6 Chip Support Package and HAL to latest versions.
Update HAL adapter for interface changes
Misc minor fixes to HAL adapter
Pull request type
Reviewers
@ARMmbed/team-cypress
Release Notes