Skip to content
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

Merged
merged 4 commits into from
Aug 28, 2019
Merged

PSOC6: Update CSP to latest #11324

merged 4 commits into from
Aug 28, 2019

Conversation

kyle-cypress
Copy link

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

[ ] Fix
[ ] Refactor
[x] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@ARMmbed/team-cypress

Release Notes

@ciarmcom
Copy link
Member

@kyle-cypress, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@0xc0170 0xc0170 requested a review from a team August 26, 2019 09:51
@0xc0170
Copy link
Contributor

0xc0170 commented Aug 26, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Aug 26, 2019

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-IAR
  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 27, 2019

@ARMmbed/mbed-os-maintainers This one should go first (see how many PRs depend on this one , above referenced)

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 27, 2019

CI restarted

@mbed-ci
Copy link

mbed-ci commented Aug 27, 2019

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-IAR

Kyle Kearney and others added 3 commits August 27, 2019 15:10
@kyle-cypress
Copy link
Author

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

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 28, 2019

CI restarted

@mbed-ci
Copy link

mbed-ci commented Aug 28, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 3
Build artifacts

@0xc0170 0xc0170 removed the needs: CI label Aug 28, 2019
@0xc0170 0xc0170 changed the title Update CSP to latest PSOC6: Update CSP to latest Aug 28, 2019
@0xc0170 0xc0170 merged commit d7b5f75 into ARMmbed:master Aug 28, 2019
@0xc0170
Copy link
Contributor

0xc0170 commented Aug 28, 2019

@kyle-cypress Can you update dependencies now and let us know which one is readY?

Copy link
Contributor

@kjbracey kjbracey left a 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;
Copy link
Contributor

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.

kyle-cypress pushed a commit to kyle-cypress/mbed-os that referenced this pull request Sep 18, 2019
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)
romanjoe pushed a commit to romanjoe/mbed-os that referenced this pull request Sep 20, 2019
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)
mirelachirica pushed a commit to mirelachirica/mbed-os that referenced this pull request Oct 15, 2019
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)
adbridge pushed a commit that referenced this pull request Oct 15, 2019
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)
adbridge pushed a commit that referenced this pull request Oct 16, 2019
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants