Skip to content

Commit 26a8c65

Browse files
committed
tinusb: Fix usbd_stack memory alignment
usbd_stack could be placed at memory with wrong alignment. For pic32 with FPU enabled that results in exceptions when code tries to store/restore FPU registers. Now OS_TASK_STACK_DEFINE is used that forces correct alignment.
1 parent 7a9dd95 commit 26a8c65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hw/usb/tinyusb/src/tinyusb.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#if MYNEWT_VAL(OS_SCHEDULING)
3333
static struct os_task usbd_task;
34-
static os_stack_t usbd_stack[OS_STACK_ALIGN(USBD_STACK_SIZE)];
34+
OS_TASK_STACK_DEFINE(usbd_stack, USBD_STACK_SIZE);
3535
#endif
3636

3737
/**

0 commit comments

Comments
 (0)