SPIFI with LPCXpresso on LPC4333

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

SPIFI with LPCXpresso on LPC4333

626 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jschuld on Sun May 12 15:35:28 MST 2013

Hi,


 


We are migrating a project to the LPC4333 and so far all works very good. An option we kept in mind is to move to SPIFI once we have a stable base, which has arrived now :)


Ideally we like to not use the NXP pre-compiled libraries but it's still acceptable if we have to. 


I am trying to find any development boards with this chip (or close derivatives) that have sample code that is usable for LPCXpresso (our development platform). I can find some for uVison, but so far no others yet.


Can anyone recommend any, or has a link to some good examples I can use as a base? From what I understand we can't use the chip's hardware driver as this has a bug in it, so have to use the software driver?


Cheers


J

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

594 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by noahk on Wed May 29 20:57:07 MST 2013

Hi J,


Here is the link to an lpcware post with an example that I wrote which uses the SPIFI registers directly. It gives an idea as to how to use the SPIFI register interface without using the library. Read the notes to get a good idea of what the example does. The spifi_functions.c file has lots of comments to make it easy to follow.


<a href="http://www.lpcware.com/content/forum/spifi-errata-and-part-version-information#comment-1023028">http://www.lpcware.com/content/forum/spifi-errata-and-part-version-information#comment-1023028</a>


The SPIFI registers are documented in the user manuals, and there is a lot of explanation about some advanced SPIFI features that aren't used in the SPIFI driver (cache bypass, dma support, interrupts). The SPIFI can also support additional parts that may not yet exist in the SPIFI library. And when using the registers directly, you can avoid storing a large library in the limited ram/flash available on these parts.


Noah

0 项奖励
回复

594 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jschuld on Wed May 29 20:08:00 MST 2013

I wonder how many actually use this. I have solved the issue in the meantime, so for whoever is interested, here is what I ended up doing.


It turns out that there was actually no compiler error. Eventhough the linker shows the above message as an error (Conflicting CPU architectures 0/13), the binary is actlually created and works. This just threw me off initially. I assumed that an error would not result in a binary file being created. After this it all works as expected. I sped up the the clock to its maximum and all working as expected.


 


A1: The LPC4333 does indeed NOT have the ROM drivers


A2: I found what I think are the latest in the LPCOpen tree. (1.03 at time of writing)


A3: Still have not found any, but in the end it was all relatively simple.


0 项奖励
回复

594 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jschuld on Mon May 13 21:04:59 MST 2013

Meanwhile I have been able to get a small project working on the LPC4088 that writes to a SPIFI device. I've based this on a uVision project which I ported to LPCXpresso. As the LPC4088 has ROM drivers available for SPIFI, there is obviously no driver that needs to be linked against.


However, for the LPC4333 I'm still struggling. I have again based something on a uVision (http://www.lpcware.com/content/nxpfile/lpc4350apdlzip).


Although the SPIFI example seems to have the software SPIFI library in it (for cortex-m4), I am not succesfull with loading this project using a J-Link. I've ported it to LPCXpresso, the same way I did for


the LPC4088 project but I get a lot of linker errors, mostly "Conflicting CPU architectures 0/13". I have selected the proper core, (LPC4333/M4), and ensured everything is that is build is build for the Cortex-M4. 


I figured the issue is likely that I used a library that was part of a uVision project. I have foud a NXP released one (http://www.lpcware.com/system/files/SPIFILib-2012-12-11_0.zip) but this causes the same errors. I suspect it is still caused because of a conflict, as I have based my LPCXpresso project on a uVision project.


So I still have some questions:


Q1: Is it correct that the LPC4333 does NOT have ROM drivers for SPIFI, but the LPC4350 does?


Q2: Am I using the latest SPIFI software drivers? (I found the link in a forum post, but no idea if there is a later one already)


Q3: Are there any examples that use the software drivers on LPCXPresso?


 


Any help appreciated.


 


Cheers


J

0 项奖励
回复