Closed trowbridgec closed 5 years ago
This looks like the interface/host test problem , not related to trng - however do not understand how this is not seen in other tests (the start sequence is different, should not be prior sync packet?).
Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-1261
The TRNG test initiates a hardware reset in the middle of the test to verify the randomly generated data is indeed random. By default, it requires DAPLink to intercept break to initiate the reset. If there's no DAPLink, it will fail. If it hangs after the 2nd sync, it typically means the reset did not go through. There is another alternative to initiates reset using pyOCD but that requires some hack.
@flit any insight?
I think @linlingao explained it. If the serial port is not going through DAPLink, then the serial break sent by the test host will not be intercepted to reset the target.
Sounds like the hack method might be less desirable than getting hard reset working with the current or other daplink adapter.
Yeah, I would recommend getting DAPLink to work since it's an integral part of Mbed.
That makes sense because we are using a separate UART for communicating with the DUT (utilizing the mbedls mocking/override functionality).
@trowbridgec Do you mind closing this?
@linlingao @trowbridgec is PTO today.
Go ahead and close. Since we have debugger on a baseboard board, it is resolvable without source changes.
Description
While running the Mbed OS Greentea tests to validate adding the
EP_AGORA
target, I found that I had to manually press the RESET button during thetests-mbed_hal-trng
test in order for it to pass (see PR #10629).The 'Agora' (
EP_AGORA
) board does not have a DAPLink circuit on board; we debug and program it via an nRF52840 DK running a modified version of DAPLink that forces the interface chip to use the external debug port. I'm not positive, but that could be related?Below I've attached some verbose logs of the test failing on
GCC_ARM
andIAR
. It seems like the host test hangs waiting after sending the 2ndsync
. If I manually RESET the target right after thesync
is sent, the test continues and passes without issue.IAR
: EP_AGORA_IAR_tests-mbed_hal-trng-failure.txtGCC_ARM
: EP_AGORA_GCC_ARM_tests-mbed_hal-trng-failure.txtIssue request type