Skip to content

Conversation

ccli8
Copy link
Contributor

@ccli8 ccli8 commented Nov 21, 2018

Description

This PR adds support for DAC (analog-out) HAL on Nuvoton tagets.

Support targets

  • NUMAKER_PFM_NANO130
  • NUMAKER_PFM_M453
  • NUMAKER_PFM_M487/NUMAKER_IOT_M487
  • NUMAKER_PFM_M2351

Pull request type

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

@0xc0170 0xc0170 requested review from a team November 21, 2018 09:57
@ccli8
Copy link
Contributor Author

ccli8 commented Nov 21, 2018

Test reports of ci-test-shield/analog-out test on NANO130/M453 targets are listed below. M487/M2351 are not listed because their DAC pinout collide with USB VCOM Tx/Rx and cannot run this test. They are tested separately.

+-------------------------+---------------------+---------------------+-------------------+--------+--------+--------+--------------------+
| target                  | platform_name       | test suite          | test case         | passed | failed | result | elapsed_time (sec) |
+-------------------------+---------------------+---------------------+-------------------+--------+--------+--------+--------------------+
| NUMAKER_PFM_NANO130-ARM | NUMAKER_PFM_NANO130 | tests-api-analogout | AnalogOut on AOUT | 1      | 0      | OK     | 0.06               |
+-------------------------+---------------------+---------------------+-------------------+--------+--------+--------+--------------------+
mbedgt: test case results: 1 OK
+----------------------+------------------+---------------------+-------------------+--------+--------+--------+--------------------+
| target               | platform_name    | test suite          | test case         | passed | failed | result | elapsed_time (sec) |
+----------------------+------------------+---------------------+-------------------+--------+--------+--------+--------------------+
| NUMAKER_PFM_M453-ARM | NUMAKER_PFM_M453 | tests-api-analogout | AnalogOut on AOUT | 1      | 0      | OK     | 0.05               |
+----------------------+------------------+---------------------+-------------------+--------+--------+--------+--------------------+
mbedgt: test case results: 1 OK


const struct nu_modinit_s *modinit = get_modinit(obj->dac, dac_modinit_tab);
MBED_ASSERT(modinit != NULL);
MBED_ASSERT(modinit->modname == obj->dac);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_modinit(...) can't return modinit object with modname != obj->dac.
So, MBED_ASSERT(modinit->modname == obj->dac) is redundancy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cyliangtw This is to check the flow PinMap_DAC/dac_modinit_tab/get_modinit is bug-less, like error in any of them, in development time. Anyway, MBED_ASSERT is removed in release build.

@@ -0,0 +1,198 @@
/* mbed Microcontroller Library
* Copyright (c) 2015-2016 Nuvoton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix the year (2018 for this new file) ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add SPDX identifier please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0xc0170 I fixed them in e24a3c0.

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks fine to me, just fixing the license headers

@cmonr
Copy link
Contributor

cmonr commented Dec 1, 2018

CI started.

@mbed-ci
Copy link

mbed-ci commented Dec 1, 2018

Test run: SUCCESS

Summary: 4 of 4 test jobs passed
Build number : 1
Build artifacts
Build logs

@0xc0170 0xc0170 merged commit 179098d into ARMmbed:master Dec 3, 2018
@ccli8 ccli8 deleted the nuvoton_analogout branch December 4, 2018 01:14
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.

5 participants