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

Conversation

@kyle-cypress
Copy link

commented Aug 24, 2019

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 ciarmcom requested a review from ARMmbed/mbed-os-maintainers Aug 25, 2019
@ciarmcom

This comment has been minimized.

Copy link
Member

commented Aug 25, 2019

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

@0xc0170 0xc0170 requested a review from ARMmbed/team-cypress Aug 26, 2019
@0xc0170 0xc0170 added needs: CI and removed needs: review labels Aug 26, 2019
@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 26, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member

commented Aug 27, 2019

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

@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 27, 2019

CI restarted

@mbed-ci

This comment has been minimized.

Copy link

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 Aug 23, 2019
Update HAL adapter for interface changes
Misc minor fixes to HAL adapter
@kyle-cypress kyle-cypress force-pushed the kyle-cypress:pr/psoc6-csp branch from 141742e to 8ad377a Aug 27, 2019
@kyle-cypress

This comment has been minimized.

Copy link
Author

commented Aug 27, 2019

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

This comment has been minimized.

Copy link
Member

commented Aug 28, 2019

CI restarted

@mbed-ci

This comment has been minimized.

Copy link

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
25 checks passed
25 checks passed
continuous-integration/jenkins/pr-head This commit looks good
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+72 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8491 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8464B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 28, 2019

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

Copy link
Contributor

left a comment

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;

This comment has been minimized.

Copy link
@kjbracey-arm

kjbracey-arm Sep 2, 2019

Contributor

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 added 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 added 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 added 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 added 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
7 participants
You can’t perform that action at this time.