SPIFI Interface with LPC1850 issue

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

SPIFI Interface with LPC1850 issue

693 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Noufal on Tue Sep 29 08:27:22 MST 2015
Hello,

I'm trying to interface 1850 with SPIFI S25FL032 in Keil enviromnet, My issue is I'm able to program the spifi with Keil algorithm, but when in tried to run the program from spifi it does not work.

I tried different options

1. Tried to put the jumber to boot from spifi and put all my boot routine in spifi region. Not even coming to SystemInit routine in the system startup

LR_ROM1 0x14000000 0x00400000  {    ; load Spifi region size_region
  ER_ROM1 0x14000000 0x00400000  {  ; load address = execution address

   *.o (RESET, +First)
   *(InRoot$$Sections)
     *RTX_CM3.lib (+RO)
    RTX_Conf_CM.o (+RO)  
.ANY (+RO)
  }

2. Tried to load from external flash and added few images in the spifi region

Both did not work, Is there any initialization need to be done in the application for Spifi to work in read only mode ? I'm not writing anything on run time now?

When I run the  keil example Blinky from spifi  it does work from my board. I'm not sure what i'm doing wrong? Please help
标签 (1)
0 项奖励
回复
9 回复数

531 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Noufal on Fri Oct 30 06:41:45 MST 2015
Hi MC,
Please find the attachment, This file has the init function ( SystemInit)

-Noufal
0 项奖励
回复

531 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Thu Oct 29 21:31:00 MST 2015
Hi Noufal,
It looks like initialization is not correct. Could you please post your code here?
0 项奖励
回复

531 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Noufal on Wed Oct 28 11:51:22 MST 2015
Thanks Bavarian for the info, I tested this during my testing i found out that with with Spifi chip S25FL32 my code is able to get to SystemInit function, but with S25FL256 it's not even reaching to SystemInit

I saw following error in debugger command window when i reset

Cannot access Memory (@ 0x14022f10, Read, Acc Size: 4 Byte)
Cannot access Memory (@ 0x14022ef4, Read, Acc Size: 2 Byte)
Cannot access Memory (@ 0x14022ef8, Read, Acc Size: 4 Byte)
Cannot access Memory (@ 0x14022f18, Read, Acc Size: 4 Byte)
Cannot access Memory (@ 0x14022f14, Read, Acc Size: 4 Byte)
Cannot access Memory (@ 0x00000000, Read, Acc Size: 4 Byte)
Cannot access Memory (@ 0x00000000, Read, Acc Size: 1 Byte)
Cannot access Memory (@ 0x14022efc, Read, Acc Size: 4 Byte)
0 项奖励
回复

531 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Tue Oct 06 04:03:42 MST 2015
If you work with the SPIFI boot mode, then the MCU runs on 96MHz and the SPIFI clock is set to 32MHz.
Please test your code without changing this setup. Do not set any other PLL frequency like 120MHz or 180MHz.
If you go higher than about 40MHz the qSPI devices require a specific initialization, so if you switch from the 96MHz to 180MHz and leave the divider for the SPIFI clock like it is ( :3 ), then you run with 60MHz on the SPIFI. This means you need to do something upfront, otherwise it will crash as soon as it starts working on the higher frequency.

Regards,
NXP Support Team.
0 项奖励
回复

531 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Noufal on Wed Sep 30 09:00:19 MST 2015
Today, I tried adding my files to blinky example (Keil example where it boot from Spifi) and when the RAM is filled up so i enabled the SDRAM after that, the system init causes a Hard Fault (before main()). So i'm not sure when i'm using SDRAM and SPIFI is there any other setting needs to be done in the linker file?

When i run external NOR flash and  SDRAM it's working ok
0 项奖励
回复

531 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Tue Sep 29 19:00:15 MST 2015
Hi Noufal,
Not sure if you are using your own developed code or LPCOpen code!
If you have developed your own code please check below points.

1) SPIFI port initialization including SPIFI chip select
2) SPIFI clock setting
3) Probe SPIFI clock pin(P3_3)
4) Set system PLL at low/medium speed less than 90MHz.
0 项奖励
回复

531 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Noufal on Tue Sep 29 13:43:21 MST 2015
Hi MC,
Thanks for your quick reply. I made both P1_1 and Pin 2_7 pulled up, still same result. For some reason it's not detecting the jumper or there is some error while it's trying to boot up. When i use my external NOR flash I'm able to boot-up from that


I have used the package which used in the keil blinky examples where spifi is working.

My main requirement of spifi is to store images for TFT display, So if i only want to read few images in run time (even if i'm not able to boot from spifi, it's works for me), Currently when i try to read from that lociation after booting from NOR flash i get hard fault,  Can i know what are minimal initialization need to be done for SPIFI get working?



-Noufal 
0 项奖励
回复

531 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Tue Sep 29 10:16:20 MST 2015
Hi Noufal,
Please also make sure that Pin2_7 is pulled up.
0 项奖励
回复

531 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Tue Sep 29 09:20:10 MST 2015
Hi Noufal,
Which s/w package are you using?
Can you get S/W package from
http://www.lpcware.com/system/files/lpcopen_2_12_keil_iar_ngx_xplorer_1830.zip

You can also use LPCXpresso Tool Chain and use example from below page
https://www.lpcware.com/content/project/nxp-peripherals/spifi-nxp-microcontrollers

Please see code example heading
0 项奖励
回复