 
					
				
		
Hello.
I'm using IAR and developing my project.
I've noticed very strange thing - when my code is over 240 000 bytes (code memory), program does not start. When I've just remove any fuction to achieve code limit under 240 000 bytes it works fine. What is wrong?
IDE = IAR (time limited)
Board = Kintetis K60N512 (tower kit)
Debugger = JLINK
Firmware:
FNET bootloader (first 48kb of code)
Application (up to 240 000 bytes works fine)
Solved! Go to Solution.
 LuisCasado
		
			LuisCasado
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello,
Try to add these lines at the beginning of your project code:
FMC_PFB0CR&=~(FMC_PFB0CR_B0DCE_MASK | FMC_PFB0CR_B0ICE_MASK | FMC_PFB0CR_B0DPE_MASK | FMC_PFB0CR_B0IPE_MASK);
FMC_PFB1CR&=~(FMC_PFB1CR_B1DCE_MASK | FMC_PFB1CR_B1ICE_MASK | FMC_PFB1CR_B1DPE_MASK | FMC_PFB1CR_B1IPE_MASK);
It is possible that you have an early silicon in your TWR-K60. There was a bug when crossing flash blocks boundaries.
Best Regards,
Luis
 LuisCasado
		
			LuisCasado
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello,
Try to add these lines at the beginning of your project code:
FMC_PFB0CR&=~(FMC_PFB0CR_B0DCE_MASK | FMC_PFB0CR_B0ICE_MASK | FMC_PFB0CR_B0DPE_MASK | FMC_PFB0CR_B0IPE_MASK);
FMC_PFB1CR&=~(FMC_PFB1CR_B1DCE_MASK | FMC_PFB1CR_B1ICE_MASK | FMC_PFB1CR_B1DPE_MASK | FMC_PFB1CR_B1IPE_MASK);
It is possible that you have an early silicon in your TWR-K60. There was a bug when crossing flash blocks boundaries.
Best Regards,
Luis
 
					
				
		
Thanks Luis, it works.
Solved.
Regards
Jakub
