USB CDC stopped working when I got the NOR_Flash working...

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB CDC stopped working when I got the NOR_Flash working...

Jump to solution
902 Views
tom_porter
Contributor I

Using an RT1021, I started with the FeeRTOS hello project, using the 1020 dev kit as my HW board, I added in the USB CDC libraries no probs, and got the CDC USB functions and talking fine. I need NVM, so I added in the flexspi_nor_flash example, after searching finally found that the HW was crashing since the linker scripts were not there. So I brought over the linker scripts, containing

*(EXCLUDE_FILE(*flexspi_nor_flash_ops.o *fsl_flexspi.o) .text*)

and

<#if memory.name=="SRAM_ITC">

*flexspi_nor_flash_ops.o(.text*)

*fsl_flexspi.o(.text*)

</#if>

 

and

 

<#if memory.name=="BOARD_SDRAM">

*(.bss*)

</#if>

 

However once I do this, the USB CDC stops working, in device manager it

complains code 43, a request for the USB descriptor failed. Has anyone

else run into this? The UART on this board still works fine.

 

If I remove the linker scripts and comment out calling the nor_flash

functions, the USB starts working again.

 

Thanks and much appreciated.

0 Kudos
Reply
1 Solution
857 Views
mayliu1
NXP Employee
NXP Employee

Hi @tom_porter ,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.

If SEMC(the external SDRAM controller) is not initialized, operations on the .bss section may fail. This may cause  crashes, and USB CDC initialization may fail as well.
 

Please try below:

1: Set .bss in internal SRAM (Do not use SDRAM).

2: If you need use SDRAM  , enable XIP_BOOT_HEADER_DCD_ENABLE = 1 

mayliu1_0-1770261412523.pngmayliu1_0-1770261412523.png

Wish it helps you

Best Regards

MayLiu

View solution in original post

0 Kudos
Reply
2 Replies
789 Views
tom_porter
Contributor I

Worked great, thanks for the help

0 Kudos
Reply
858 Views
mayliu1
NXP Employee
NXP Employee

Hi @tom_porter ,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.

If SEMC(the external SDRAM controller) is not initialized, operations on the .bss section may fail. This may cause  crashes, and USB CDC initialization may fail as well.
 

Please try below:

1: Set .bss in internal SRAM (Do not use SDRAM).

2: If you need use SDRAM  , enable XIP_BOOT_HEADER_DCD_ENABLE = 1 

mayliu1_0-1770261412523.pngmayliu1_0-1770261412523.png

Wish it helps you

Best Regards

MayLiu

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2305576%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EUSB%20CDC%20stopped%20working%20when%20I%20got%20the%20NOR_Flash%20working...%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2305576%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EUsing%20an%20RT1021%2C%20I%20started%20with%20the%20FeeRTOS%20hello%20project%2C%20using%20the%201020%20dev%20kit%20as%20my%20HW%20board%2C%20I%20added%20in%20the%20USB%20CDC%20libraries%20no%20probs%2C%20and%20got%20the%20CDC%20USB%20functions%20and%20talking%20fine.%20I%20need%20NVM%2C%20so%20I%20added%20in%20the%20flexspi_nor_flash%20example%2C%20after%20searching%20finally%20found%20that%20the%20HW%20was%20crashing%20since%20the%20linker%20scripts%20were%20not%20there.%20So%20I%20brought%20over%20the%20linker%20scripts%2C%20containing%3C%2FP%3E%3CP%3E%3CSPAN%3E*(EXCLUDE_FILE(*flexspi_nor_flash_ops.o%20*fsl_flexspi.o)%20.text*)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Eand%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CP%3E%3CSPAN%3E%26lt%3B%23if%3C%2FSPAN%3E%20memory.name%3D%3D%3CSPAN%3E%22SRAM_ITC%22%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E*%3C%2FSPAN%3E%3CSPAN%3Eflexspi_nor_flash_ops.o%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E.text%3C%2FSPAN%3E%3CSPAN%3E*%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E*%3C%2FSPAN%3E%3CSPAN%3Efsl_flexspi.o%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E.text%3C%2FSPAN%3E%3CSPAN%3E*%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3Eand%3C%2FP%3E%3CBR%20%2F%3E%3CDIV%3E%3CDIV%3E%3CP%3E%3CSPAN%3E%26lt%3B%23if%3C%2FSPAN%3E%20memory.name%3D%3D%3CSPAN%3E%22BOARD_SDRAM%22%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E*%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E.bss%3C%2FSPAN%3E%3CSPAN%3E*%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3EHowever%20once%20I%20do%20this%2C%20the%20USB%20CDC%20stops%20working%2C%20in%20device%20manager%20it%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Ecomplains%20code%2043%2C%20a%20request%20for%20the%20USB%20descriptor%20failed.%20Has%20anyone%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Eelse%20run%20into%20this%3F%20The%20UART%20on%20this%20board%20still%20works%20fine.%20%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3EIf%20I%20remove%20the%20linker%20scripts%20and%20comment%20out%20calling%20the%20nor_flash%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Efunctions%2C%20the%20USB%20starts%20working%20again.%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3EThanks%20and%20much%20appreciated.%20%3C%2FSPAN%3E%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2312530%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20USB%20CDC%20stopped%20working%20when%20I%20got%20the%20NOR_Flash%20working...%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2312530%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F156668%22%20target%3D%22_blank%22%3E%40tom_porter%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20your%20interest%20in%20NXP%20Semiconductor%20products%20and%20for%20the%20opportunity%20to%20serve%20you.%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3EIf%20SEMC(the%20external%20SDRAM%20controller)%26nbsp%3Bis%20not%20initialized%2C%20operations%20on%20the%20.bss%20section%20may%20fail.%20This%20may%20cause%26nbsp%3B%20crashes%2C%20and%20USB%20CDC%20initialization%20may%20fail%20as%20well.%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3EPlease%20try%20below%3A%3C%2FP%3E%0A%3CP%3E1%3A%20Set%20.bss%20in%20internal%20SRAM%20(Do%20not%20use%20SDRAM).%3C%2FP%3E%0A%3CP%3E2%3A%20If%20you%20need%20use%20SDRAM%26nbsp%3B%20%2C%20enable%20XIP_BOOT_HEADER_DCD_ENABLE%20%3D%201%26nbsp%3B%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mayliu1_0-1770261412523.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22mayliu1_0-1770261412523.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22mayliu1_0-1770261412523.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F375592iEB983CD1BE2C1205%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22mayliu1_0-1770261412523.png%22%20alt%3D%22mayliu1_0-1770261412523.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Emayliu1_0-1770261412523.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EWish%20it%20helps%20you%3C%2FP%3E%0A%3CP%3EBest%20Regards%3C%2FP%3E%0A%3CP%3EMayLiu%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2317378%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20USB%20CDC%20stopped%20working%20when%20I%20got%20the%20NOR_Flash%20working...%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2317378%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWorked%20great%2C%20thanks%20for%20the%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E