Skip to content

Conversation

@AllenZhang-NXP
Copy link
Contributor

Added board shared sram bypass first 8KB overlay.
The overlay configure shall bypass first 8KB memory to avoid being clear during system startup.
In test_wdt.c, there're three variables m_state, m_testcase_index and m_testvalue which are linked in the NOINIT_SECTION section.
And these three variables are used to store the test state and the test case index, after the watchdog reset, this case will check the value of the m_state and m_testcase_index, then add 1 to m_testcase_index and run the next test case.
I checked the memory map and found these three variables are linked to:
0x200055e8 m_testvalue
0x200055ec m_testcase_index
0x200055f0 m_state
After the watchdog trigger a reset, the memory starts from 0x20005000 ~ 0x20005BC0 will be set to 0 automatically (Confirmed it is a silicon behaviour, maybe ROM code do this).
As a result, the value of the variables will be cleared to 0. This is why this case is always reset.

Validated the commands below, hi @hakehuang, please help to double check, thank you!
west build -p=auto tests/drivers/watchdog/wdt_basic_api -b frdm_mcxw23 -T drivers.watchdog.nxp_mcxw2xx_bypass_first_8k
west build -p=auto tests/drivers/watchdog/wdt_basic_api -b mcxw23_evk -T drivers.watchdog.nxp_mcxw2xx_bypass_first_8k

Fixes #98282

Added board shared sram bypass first 8KB overlay.
The overlay configure shall bypass first 8KB memory to avoid
being clear during system startup.

Signed-off-by: Allen Zhang <chunfeng.zhang@nxp.com>
@sonarqubecloud
Copy link

@hakehuang
Copy link
Contributor

ci failure is reported #97023

@hakehuang
Copy link
Contributor

Validated the commands below, hi @hakehuang, please help to double check, thank you!
west build -p=auto tests/drivers/watchdog/wdt_basic_api -b frdm_mcxw23 -T drivers.watchdog.nxp_mcxw2xx_bypass_first_8k west build -p=auto tests/drivers/watchdog/wdt_basic_api -b mcxw23_evk -T drivers.watchdog.nxp_mcxw2xx_bypass_first_8k

twister regression test pass on v4.3.0-rc1-142-gae1af302830f

@dleach02
Copy link
Member

@AllenZhang-NXP is this because the first 8K does not get retained over resets?

We have been aware of multiple platforms where this lack of retention impacts this test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards/SoCs area: Tests Issues related to a particular existing or missing test area: Watchdog Watchdog platform: NXP MCU platform: NXP NXP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests: tests/drivers/watchdog/wdt_basic_api: frdm_mcxw23/mcxw236: failed: Unknown Error

4 participants