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

NUCLEO_F429ZI Issues #2956

Closed
screamerbg opened this issue Oct 6, 2016 · 18 comments
Closed

NUCLEO_F429ZI Issues #2956

screamerbg opened this issue Oct 6, 2016 · 18 comments

Comments

@screamerbg
Copy link
Contributor

screamerbg commented Oct 6, 2016

Description

  • Type: Bug
  • Priority: Major

Interrupt failures (InterruptIn)

InterruptIn on D2 actually works
InterruptIn on D3 throws greentea error, I suspect that the test crashes
InterruptIn on D4-9 are skipped due to the error with InterruptIn on D3

Analog In failures (AnalogIn)

Analog Input on A0 (fails with GCC, but works with ARMCC)

## I2C failures with EEPROM (I2C)
I2C - EEProm Read (fails with ARMCC, GCC)
I2C - TMP102 Temperature Read (fails with GCC, works with ARMCC)

Target
NUCLEO_F429ZI

Toolchain:
GCC_ARM+ARM

meed-os sha:
22ec73b Merge pull request #2948 from jamike/Fixed_iarm_debug_built_failed

Steps to reproduce
Tests available here https://github.com/armmbed/ci-test-shield
Hardware components here https://github.com/ARMmbed/mbed-HDK/tree/master/Production%20Design%20Projects/CITestShield

CC @adustm @bcostm

@bcostm
Copy link
Contributor

bcostm commented Oct 13, 2016

I'll have a look but I need absolutely a uVision or SW4STM32 project with latest mbed files to debug. Today I am not able to generate a project using project.py tool... See Issues #2995 #2882

@screamerbg
Copy link
Contributor Author

screamerbg commented Oct 14, 2016

I2C no longer an issue thanks to PR #2972. cc @adustm @bcostm @betzw

@bcostm
Copy link
Contributor

bcostm commented Oct 17, 2016

Some news:

InterruptIn failures

  • Confirmed on D3 with ARM and GCC_ARM toolchains.
  • Debug on-going. I need to create first a uVision project because project.py does not work anymore...

AnalogIn failures

  • Confirmed on A0 with GCC_ARM.
  • OK with ARM.
  • Issue solved by increasing the ADC sampling time to 28 cycles (instead of 15). A pull Request will be done.

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 17, 2016

@bcostm Thanks for looking at these issues

@bcostm
Copy link
Contributor

bcostm commented Oct 17, 2016

For the AnalogIn, the error comes from the test itself. The previous_value is initialized to 0 and sometimes the first convertion is also equal to 0... And the test is fail due to the assert who is checking that the current_value > previous_value...

I kept the initial 15 sampling time, and after correcting the test:

+-------------------+---------------+--------------------+-----------------------+--------+--------+--------+--------------------+
| target            | platform_name | test suite         | test case             | passed | failed | result | elapsed_time (sec) |
+-------------------+---------------+--------------------+-----------------------+--------+--------+--------+--------------------+
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-api-analogin | Analog Input on AIN_0 | 1      | 0      | OK     | 0.32               |
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-api-analogin | Analog Input on AIN_1 | 1      | 0      | OK     | 0.33               |
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-api-analogin | Analog Input on AIN_2 | 1      | 0      | OK     | 0.36               |
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-api-analogin | Analog Input on AIN_3 | 1      | 0      | OK     | 0.31               |
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-api-analogin | Analog Input on AIN_4 | 1      | 0      | OK     | 0.33               |
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-api-analogin | Analog Input on AIN_5 | 1      | 0      | OK     | 0.33               |
+-------------------+---------------+--------------------+-----------------------+--------+--------+--------+--------------------+

+-----------------------+---------------+--------------------+-----------------------+--------+--------+--------+--------------------+
| target                | platform_name | test suite         | test case             | passed | failed | result | elapsed_time (sec) |
+-----------------------+---------------+--------------------+-----------------------+--------+--------+--------+--------------------+
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-api-analogin | Analog Input on AIN_0 | 1      | 0      | OK     | 0.32               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-api-analogin | Analog Input on AIN_1 | 1      | 0      | OK     | 0.34               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-api-analogin | Analog Input on AIN_2 | 1      | 0      | OK     | 0.36               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-api-analogin | Analog Input on AIN_3 | 1      | 0      | OK     | 0.35               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-api-analogin | Analog Input on AIN_4 | 1      | 0      | OK     | 0.35               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-api-analogin | Analog Input on AIN_5 | 1      | 0      | OK     | 0.32               |
+-----------------------+---------------+--------------------+-----------------------+--------+--------+--------+--------------------+


@screamerbg
Copy link
Contributor Author

@BlackstoneEngineering

@BlackstoneEngineering
Copy link
Contributor

@bcostm how did you correct the test? Mind providing code or submitting a PR against the CI Test shield?

I assume you just initialized outputs to 1?

@bcostm
Copy link
Contributor

bcostm commented Oct 18, 2016

Concerning the InterruptIn, I understood the problem but it is not solved. It is because the same interrupt vector is used for GPIO pins Px_5 to Px_9 and another one for pins Px_10 to Px_15.
I have tested each pin individually and they are all ok.
If you test for example D6 (pin Px_9) and any other pin (Px_10 to Px_15) it is ok. But as soon as two pins are tested which are on the same IT vector the test crashes...

@bcostm
Copy link
Contributor

bcostm commented Nov 14, 2016

I have created a uvision project using "mbed export" to debug the InterruptIn issue on Nucleo_F429ZI.

But the program is waiting for something on the serial port (continuous loop in serial_readable function) and the tests are not executed.

Someone has an idea how to debug these ci tests ? Is there something to enable ?

@BlackstoneEngineering
Copy link
Contributor

@bcostm are you using Uvision 4 or 5?
Also, greentea tests are not meant to be run from within uvision, they're meant to be run with greentea, ie the mbed test command, so if you just run the test in uvision you wont have the other half of the test ecosystem running (the greentea bit on the computer that catches and drives the tests), so I would expect it to hang infinitely.

@bcostm
Copy link
Contributor

bcostm commented Nov 14, 2016

I use uvision 5 and this is what I thought. So, it's very difficult to debug this test case :(

FYI I tried also on the NUCLEO_F411RE. Same fail on D3 pin (=PB_3) when it follows the test of D2 pin (PA_10). But in this case they are not using the same interrupt vector as on the F429. So the idea I add previously is not the good one unfortunately, there is something else...

@adustm
Copy link
Member

adustm commented Nov 15, 2016

Hello @BlackstoneEngineering , @0xc0170 , @screamerbg
Do you have any clue to use a debugger together with greentea ? We need it in order to be able to read HW registers etc... in case of test failure.
Cheers

@bridadan
Copy link
Contributor

Hi @adustm, I have some instructions for using a debugger with greentea here: https://github.com/ARMmbed/mbed-os/blob/master/docs/testing_mbed_OS_5.md#debugging-tests

Please let me know if you have any issues!

@bcostm
Copy link
Contributor

bcostm commented Nov 16, 2016

Hi,
Thanks for this information. I can now debug the test 👍
[Edit] In fact I can launch the test using mbhtrun but the program does not stop on the breakpoint I set in the uvision IDE. Any clue ?

@bridadan
Copy link
Contributor

Where are you setting the breakpoint? And perhaps double check the debugger settings on uVision?

@bridadan
Copy link
Contributor

Also another thought, do you know if its possible to use the debugger while also using the serial port on STLink devices? I know there are other interface firmwares out there that don't allow this (I think CMSIS-DAP was one of them)

@adustm
Copy link
Member

adustm commented Nov 18, 2016

Hello @bridadan
It works fine also for me, in another context using GCC_ARM.
Thanks
Armelle

@adustm
Copy link
Member

adustm commented Nov 21, 2016

Hi,
I just pushed a fix for InterruptIn test.
SYSCFG_EXTICRx, EXTI_IMR, EXTI_RTSR, EXTI_FTSR registers were not in a correct state after the sw destruction of the InterruptIn object.
The next time those HW registers were activated by a new InterruptIn object, the interrupt management was all messed up.

@0xc0170 0xc0170 closed this as completed in 0219b64 Dec 2, 2016
0xc0170 added a commit that referenced this issue Dec 2, 2016
Fix #2956 #2939 #2957 #2959 #2960: Add HAL_DeInit function in gpio_irq destructor
adbridge pushed a commit that referenced this issue Dec 19, 2016
… ci-test-shield tests-api-interruptin to pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants