AnsweredAssumed Answered

USB Device Stack cache MACROs

Question asked by Buck Fobb on May 12, 2019
Latest reply on May 21, 2019 by Buck Fobb

Hi - I'm attempting to get the USB Device Stack (SDK 2.5.0), usb_device_cdc_vcom/freertos example, ported to a custom pcba/freertos application running on the IMXRT1020. This pcba is using external sdram for much of the code/data, including the usb stack.


I followed the instructions in MCUXpresso SDK USB Stack User’s Guide 2.4.4 USB Cache Related MACROs Definitions. The example usb_device_cdc_vcom/freertos does not define USB_STACK_USE_DEDICATED_RAM. I modified the linker script to place .bss.m_usb_global (the only attribute used in the compiled usb_xxx.c files I'm using) into the internal TCM memory, but I'm unable to get usb working (the "reset" event works, but the stack state machine never makes it beyond that).


However, by modifying the linker script to put all usb_xxx.c .bss into the internal TCM memory I've gotten it to work.


What is the proper configuration of MACROs (and where should the sections be placed in memory) for the USB Device Stack (SDK 2.5.0) built for IMXRT1020 when attempting to execute the code from external sdram but placing only the minimal required don't-cache data in internal TCM memory?


Thanks in advance for your help.