LPC1788: EMC at reset

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

LPC1788: EMC at reset

441 Views
giusloq
Contributor III

I'm using LPC1788 on a custom board. I'm using a J-Link debugger probe connected to SWD.

The user manual says PCEMC (bit 11 of PCONP) reset value is 0 (EMC peripheral is disabled). However, when I start a debug session from MCUXpresso IDE I can see PCEMC at 1, even at the beginning of ResetISR(). Anyway the project doesn't touch PCEMC at all and I tested this after a power cycle.

Another question. What happens if I access an address mapped to EMC (0xA000 0000), but the EMC is not configured yet?

I put a static variable to SDRAM through linker script. ResetISR() tries to reset bss sections, including the variable in SDRAM. During ResetISR() SDRAM is not already configured, so I thought an HardFault exception triggered, but this isn't the case. main() function is called as usual, even if I have a bss section in SDRAM (address 0xA000 0000) and EMC is not configured.

 

 

0 Kudos
1 Reply

431 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Giuseppe,

I think it is possible that the PCEMC (bit 11 of PCONP) reset value is 1 rather than 0 after Reset.

If you write/read SDRAM before you initialize the EMC, the SDRAM will not generate the timing to access SDRAM, if you write or read the correct EMC address space, I do not think the hard-fault will be triggered.

Hope it can help you

BR

XiangJun Rong

 

0 Kudos