LPC55S69: USB_SRAM clean up over reboot ?

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

LPC55S69: USB_SRAM clean up over reboot ?

652 Views
EugeneHiihtaja
Senior Contributor I

Hi !

I try to see if USB_SRAM at ox50100000 can be used for keep some data over reboot.

And it seems to me it is wiped by 0x00 by ROM code every reboot even ISP USB flashing is not used.

SRAM4 area at 0x30040000 is keep data over reboot for example.

Could you look in what cases USB_RAM wiped ? All the time over reboot or in some cases.

Can it be disabled some how in any setting if USB ISP flashing is  not planned to be used at all ?

My application need a lot of SRAM and USB_SRAM need as well.

Regards,

Eugene

Labels (1)
0 Kudos
7 Replies

547 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi 

When reboot the program, startup code initializes and zero USB_SRAM area.

please take a look at your ld file, and startup source code.

Have a nice day,

Jun Zhang

0 Kudos

547 Views
EugeneHiihtaja
Senior Contributor I

Hi ZhangJennie‌ !

This USB_SRAM and SRAM4 area is out of any memory map and not known for code at all.

MEMORY
{
/* Define each memory region */
PROGRAM_FLASH (rx) : ORIGIN = 0x10000000, LENGTH = 0x28000 /* 160K bytes (alias Flash) */
SG_veneer_table (rx) : ORIGIN = 0x1002f000, LENGTH = 0x1000 /* 4K bytes (alias Flash2) */
Ram0 (rwx) : ORIGIN = 0x30000000, LENGTH = 0x10000 /* 64K bytes (alias RAM) */
}

But SRAM4 area is retains over reboot and USB_SRAM not.

It can be so that BootROM try to sense USB interface and clean this area.

But we should know about this ROM behavior over reboot 

and does it possible to disable this. We need more SRAM what is not touched by ROM.

Regards,

Eugene

0 Kudos

547 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

your memory definition is different as MCUXpresso SDK LPC55s69  demo code.

please detail how to reproduce your issue step by step with our SDK demo code.

0 Kudos

547 Views
EugeneHiihtaja
Senior Contributor I

Hi ZhangJennie‌ !

Let's take standart freertosmpu_s/ns example for example.

Where on linker file I should able to see settings of USB_SRAM to 0 ?

Or please point me to SDK example what you talking about.

Regards,

Eugene

0 Kudos

547 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

as a general information of most LPC, bss is zero out in startup code.

pastedImage_1.png

if you have specific issue with  freertosmpu_s/ns, please detail the steps of how to reproduce the issue with this demo on my side. Thanks.

0 Kudos

547 Views
EugeneHiihtaja
Senior Contributor I

Hi ZhangJennie !

Yes, but in what example you can see that USB_RAM in included to bss area ?

If SRAM area is not included to bss it should retain context over reboot.

SRAM4 area retains , but USB RAM is always zeroed and reason is not known.

Regards,

Eugene

0 Kudos

547 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Eugene,

I use led_blinky demo.

in debug.ld.we can see BSS secion for USB RAM

pastedImage_1.png

.bss_RAM is defined in __bss_section_table,

pastedImage_2.png

Have a nice day,

Jun Zhang

0 Kudos