LPC4370 SPIFI initializing fail (boot from SPIFI)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC4370 SPIFI initializing fail (boot from SPIFI)

1,922 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by datdds on Thu Mar 17 05:58:35 MST 2016
Sorry my English is not good.
I'm using LPCLINK2 as LPC4370 evaluation board.
I try to rewrite SPI Flash memory ,after boot from SPIFI.

Debugging below code, LPCSPIFILIB library use model example



(main() located on SRAM.)
int main(void)
{
SystemCoreClockUpdate();
Board_Init();

// spifi initialize
/* Initialize LPCSPIFILIB library, reset the interface */

spifiInit(LPC_SPIFI_BASE, true);

/* Register the family for the device */
spifiRegisterFamily(spifi_REG_FAMILY_CommonCommandSet);

/* Return the number of devices this library supports */
int idx = spifiGetSuppFamilyCount();

/* Get required memory for detected device, this may vary per device family */
uint32_t memSize = spifiGetHandleMemSize(LPC_SPIFI_BASE);
if (memSize == 0) {
    /* No device detected, error */
}

uint32_t *lmem = malloc(memSize);

/* Initialize and detect a device and get device context */
SPIFI_HANDLE_T * pSpifi = spifiInitDevice(&lmem, sizeof(lmem), LPC_SPIFI_BASE, SPIFLASH_BASE_ADDRESS);
if (pSpifi == NULL) {
    /* Error initializing device */
-->while(1);
}




It has entered the while(1); loop. Why?
In addition.Oddly all memory looks as 0x2000c000

Original Attachment has been moved to: memory_test.zip

标签 (1)
0 项奖励
回复
4 回复数

1,468 次查看
lpcxpresso_supp
NXP Employee
NXP Employee

There is another thread running on this issue at the moment in the LPCXpresso IDE forum : https://community.nxp.com/thread/434100 

0 项奖励
回复

1,468 次查看
chrisbelsky
Contributor I

Hello,

Did you ever find a solution to this problem?  If so, could you please update this post?  

Thanks,

0 项奖励
回复

1,468 次查看
lpcware
NXP Employee
NXP Employee
bump
0 项奖励
回复

1,468 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Thu Apr 07 08:17:41 MST 2016
Can you debug this project?
Then it would be good to step into the function spifiInitDevice() and find out where it fails. There are several action which can return an error.
The map file of your project looks rather ok, it seems that all relevant objects are in RAM.

I don't know what you mean with "all memory looks as 0x2000c000".

Regards,
NXP Support Team
0 项奖励
回复