SPIFI library with LPC1833

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

SPIFI library with LPC1833

跳至解决方案
4,278 次查看
Anonymous-III
Contributor III

Hi,

We need small help from NXP regarding SPIFI library.

We have connected MX25R6435F to LPC1833.

we tried to flash it using MCU Expresso along with LPC Link2 and it works perfectly. Attached is Image for reference.

In MCU Expresso project while using SPIFI library we saw that spifi_init returns error code 0x20008 (Unknown device type code).

We are not aware why such error is shown with library function of SPIFI. We are using libspifi_drv_M3.a but we are not aware how to check if it is latest version library or not.

Can any one please help to find which version library of library being used, Also from where can I get latest library for SPIFI.

Thanks

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
4,011 次查看
Anonymous-III
Contributor III

Hi Alice,

Thanks a lot for support with given files we were able to solve our problem.

Thanks

在原帖中查看解决方案

12 回复数
4,266 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello jigar599,

You can get new spifi lib and source code from:

https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mc...  

 

BR

Alice

0 项奖励
回复
4,262 次查看
Anonymous-III
Contributor III

Hi Alice,

Thanks for response.

We got the new library from the link provided by you, but can you help to identify from the library file .lib/.a that which version library is it?

Is there any way to find version of library from library file?

 

 What change is required in library to remove spifi_init - error code 0x20008 (Unknown device type code for MX25R6435F SPI Flash.

Thanks

标记 (3)
0 项奖励
回复
4,233 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello jigar599,

1) .a and .lib just different library format.

2) Check the version in source file, for example 

Alice_Yang_0-1630547416333.png

 

3) All the device supported is in the file of "spifilib_fam_standard_cmd.c", 

#define SPIFI_DEVICE_ALL 1 /**< Enables all devices in family */
#define SPIFI_DEVICE_S25FL016K 0 /**< Enables Spansion S25FL016K device */
#define SPIFI_DEVICE_S25FL032P 0 /**< Enables Spansion S25FL032P device */
#define SPIFI_DEVICE_S25FL064P 0 /**< Enables Spansion S25FL064P device */
#define SPIFI_DEVICE_S25FL129P_64K 0 /**< Enables Spansion S25FL129P (64K block) device */
#define SPIFI_DEVICE_S25FL129P_256K 0 /**< Enables Spansion S25FL129P (256K block) device */
#define SPIFI_DEVICE_S25FL164K 0 /**< Enables Spansion S25FL164K device */
#define SPIFI_DEVICE_S25FL256S_64K 0 /**< Enables Spansion S25FL256S (64K block) device */
#define SPIFI_DEVICE_S25FL256S_256K 0 /**< Enables Spansion S25FL256S (256K block) device */
#define SPIFI_DEVICE_S25FL512S 0 /**< Enables Spansion S25FL512S device */
#define SPIFI_DEVICE_MX25L1635E 0 /**< Enables Macronix MX25L1635E device */
#define SPIFI_DEVICE_MX25L3235E 0 /**< Enables Macronix MX25L3235E device */
#define SPIFI_DEVICE_MX25L8035E 0 /**< Enables Macronix MX25L8035E device */
#define SPIFI_DEVICE_MX25L6435E 0 /**< Enables Macronix MX25L6435E device */
#define SPIFI_DEVICE_W25Q32FV 0 /**< Enables Winbond W25Q32FV device */
#define SPIFI_DEVICE_W25Q64FV 0 /**< Enables Winbond W25Q32V device */
#define SPIFI_DEVICE_W25Q80BV 0 /**< Enables Winbond W25Q80BV device */

There isn't MX25R6435F, so spifi_init returns error code 0x20008 (Unknown device type code).

While  From file spifilib_fam_standard_cmd.c we can see, it support SPIFI_DEVICE_MX25L6435E, the two devices are similar, so I think you can check the datasheet of the twos, compare difference, refer to the APIs for MX25L6435E to write/erase  MX25R6435F.If the flash commands are the same, you can directly use.

 

BR

Alice

0 项奖励
回复
4,226 次查看
Anonymous-III
Contributor III

Hi Alice,

1. So it's only format change, both file will work same when used by code right ?

2. We don't have source code of library (.lib /.a). We only have library file with us so how we can find version from library file only ?

Thanks

0 项奖励
回复
4,220 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello jigar599,

It can't know the version if only through .lib or .a.

There also a API in source code to get library version:

Alice_Yang_0-1630634148519.png

 

And you can tell me where you get the library, I try to check whether I can provide your the source code.

 

 

BR

Alice

4,213 次查看
Anonymous-III
Contributor III

Hi Alice,

We have SPIFI .a/.lib from code we have got leveraged from some other project. We don't have any information where they got it from.

To access SPIFI library in our code we use API like spifi_init, spifi_erase, spifi_program... But such API are not seen in new library which we got from link provided by you eariler.
Please find attached .a and .lib file for your reference which we are having.

Thanks

0 项奖励
回复
4,193 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello jigar599,

Check attachment.

 

BR

Alice

4,188 次查看
Anonymous-III
Contributor III

Hi Alice,

How can we use provided files(spifidrv.zip) to generate SPIFI library file (.a/.lib) ?

Thanks

0 项奖励
回复
4,185 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello jigar599,

You can refer to the attachment of the below thread to create library:

https://community.nxp.com/t5/MCUXpresso-IDE-Knowledge-Base/How-to-create-and-use-static-library-in-M...  

 

BR

Alice 

0 项奖励
回复
4,012 次查看
Anonymous-III
Contributor III

Hi Alice,

Thanks a lot for support with given files we were able to solve our problem.

Thanks

4,245 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello jigar599,

It is the same question in salesforce, I have reply on there, please check. 

If you are not the same, tell me, I also can reply on here, thanks.

 

BR

Alice

0 项奖励
回复
4,240 次查看
Anonymous-III
Contributor III

Hi Alice,

We are unaware about what is salesforce.

If there is solution to above question could please provide link here so that we can follow it.

If not could you help how we can move forward ?

Thanks

0 项奖励
回复