Hey guys,
I am trying to interface external flash with LPC4337 controller.
Board : LPCxpresso 4337
Flash chip : onboard MX25L8035E
Example code : LPC4337_multiple_flash (download link : https://www.lpcware.com/content/faq/lpcxpresso/configuring-projects-multiple-flash)
Hey guys,
I am trying to interface external flash with LPC4337 controller. Please find below information for your reference.
Board : LPCxpresso 4337
Flash chip : onboard MX25L8035E
Example code : LPC4337_multiple_flash (download link : https://www.lpcware.com/content/faq/lpcxpresso/configuring-projects-multiple-flash).
I am getting Hardfault, when i use Flash3. It is working fine in case of Flash2. Can someone help on this.
Thanks & Regards,
Mallikarjun
Hi Mallikarjun,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
I'd like to know the more information, can you describe the steps to replicate the issue?
I'm looking forward to your reply.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi jeremyzhou,
Thanks for the reply.
Please find below steps to replicate the issue and board, code which i used for my testing
Board used : LPCXpresso4337 Development Board (Link FYI: LPCXpresso4337 Development Board|NXP ).
Code used : LPC4337_multiple_flash example code(Download Link : Configuring projects to span multiple flash devices | www.LPCware.com ).
1. Download code from above code link.
2. Import into LPCXpresso IDE and compile(without any changes in project).
3. Connect LPCXpresso4337 board to PC and start debug(JTAG).
Code :
int main(void) {
volatile unsigned addr;
addr = (unsigned) const_data_table;
printf("const_data_table at address : %#010x\n", addr);
printf("%#010x %#010x %#010x %#010x\n", const_data_table[0], const_data_table[1],
const_data_table[2], const_data_table[3]);
printf("Calling spifi_func\n");
addr = spifi_func(); ---------------------------->>Jumping to hardfault handler
printf("spifi_func at address : %#010x\n", addr);
// Force the counter to be placed into memory
volatile static int i = 0;
// Enter an infinite loop, just incrementing a counter
while (1) {
i++;
}
return 0;
}
Please find remaing code files in project(Download link provided above)
Output Log :
const_data_table at address : 0x14000010
0xdeadbeef 0xbaddcafe 0xfacefeed 0x000ff1ce
Calling spifi_func
After this it is jumping to Hardfault handler
Revert me back for more details required.
Thanks & Regards,
Mllikarjuna
Hi Mallikarjun,,
Sorry for the late reply.
I've already ran the LPC4337_multiple_flash example code on the LPCXpreeso4337 (Fig 1), and it works wells without replicating your issue (Fig 2).
So I think the demo is good and I'd highly recommend you to check the hardware again.
Fig 1
Fig 2
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------