diff --git a/tests/sys/conn_can/Makefile b/tests/sys/conn_can/Makefile index 4cf3e05a190f..962b3301b5b9 100644 --- a/tests/sys/conn_can/Makefile +++ b/tests/sys/conn_can/Makefile @@ -41,3 +41,5 @@ include $(RIOTBASE)/Makefile.include ifndef CONFIG_GNRC_PKTBUF_SIZE CFLAGS += -DCONFIG_GNRC_PKTBUF_SIZE=4096 endif + +CFLAGS += -DTHREAD_STACKSIZE_MAIN=2048 diff --git a/tests/sys/conn_can/main.c b/tests/sys/conn_can/main.c index 51d4eb945509..b470a6368986 100644 --- a/tests/sys/conn_can/main.c +++ b/tests/sys/conn_can/main.c @@ -34,6 +34,8 @@ #include "can/can_trx.h" +#define SHELL_BUFSIZE 512 /* Needed for CAN FD frame */ + #ifdef MODULE_TJA1042 #include "tja1042.h" tja1042_trx_t tja1042 = { .trx.driver = &tja1042_driver, @@ -150,7 +152,7 @@ static int _send(int argc, char **argv, bool rtr) frame.can_id = strtoul(argv[3], NULL, 16); frame.len = argc - 4; } - if (frame.len > 8) { + if (frame.len > DEFAULT_CAN_MAX_DLEN) { puts("Invalid length"); return 1; } @@ -164,6 +166,9 @@ static int _send(int argc, char **argv, bool rtr) frame.data[i] = strtol(argv[4 + i], NULL, 16); } } +#ifdef MODULE_FDCAN + frame.flags |= CANFD_BRS | CANFD_FDF; +#endif conn_can_raw_t conn; conn_can_raw_create(&conn, NULL, 0, ifnum, 0); @@ -736,8 +741,8 @@ int main(void) (void*)i, "receive_thread"); } - char line_buf[SHELL_DEFAULT_BUFSIZE]; - shell_run(_commands, line_buf, SHELL_DEFAULT_BUFSIZE); + char line_buf[SHELL_BUFSIZE]; + shell_run(_commands, line_buf, SHELL_BUFSIZE); return 0; }