Skip to content

Commit 28c766b

Browse files
djiatsaf-stkartben
authored andcommitted
tests: drivers: uart_async_api: add tx buffer in nocache memory
Since nucleo_f746zg has NOCACHE_MEM defined (related to test cases drivers.uart.async_api.nocache_mem and drivers.uart.async_api.nocache_mem_dt.nucleo_f746zg), the TX buffer should be placed in a non-cacheable memory region for the uart_async_var_buf_length testsuite to pass. Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
1 parent 81c636a commit 28c766b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/drivers/uart/uart_async_api/src/test_uart_async.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,12 @@ static void *var_buf_length_setup(void)
10681068
static void test_uart_async_var_buf(size_t buf_len, size_t tx_len)
10691069
{
10701070
int ret;
1071-
uint8_t tx_buffer[VAR_LENGTH_TX_BUF_SIZE];
1071+
1072+
#if NOCACHE_MEM
1073+
static __aligned(sizeof(void *)) uint8_t tx_buffer[VAR_LENGTH_TX_BUF_SIZE] __used __NOCACHE;
1074+
#else
1075+
static ZTEST_BMEM uint8_t tx_buffer[VAR_LENGTH_TX_BUF_SIZE];
1076+
#endif /* NOCACHE_MEM */
10721077

10731078
for (size_t i = 0; i < VAR_LENGTH_TX_BUF_SIZE; ++i) {
10741079
tx_buffer[i] = tx_len;

0 commit comments

Comments
 (0)