µTasker Forum
µTasker Forum => NXPTM M522XX, KINETIS and i.MX RT => Topic started by: neil on December 22, 2009, 03:14:32 PM
-
Hi Mark,
I am using the Flexbus on the 52259 for external Ram chip, and not using the FB_ALE pin. Can I use this pin for I/O?
Regards
Neil
-
Hi Neil
The Flexbus pins are all multiplexed with ports.
The full bus configuration looks like this (from fnConfigureBus() in M5223x.c)
// configure the port lines for non-multiplexed FlexBus (A0..A7)
PTEPAR = (TE_FB_ADD_0_FUNCTION | TE_FB_ADD_1_FUNCTION | TE_FB_ADD_2_FUNCTION | TE_FB_ADD_3_FUNCTION | TE_FB_ADD_4_FUNCTION | TE_FB_ADD_5_FUNCTION | TE_FB_ADD_6_FUNCTION | TE_FB_ADD_7_FUNCTION);
// address A8..A15
PTFPAR = (TF_FB_ADD_8_FUNCTION | TF_FB_ADD_9_FUNCTION | TF_FB_ADD_10_FUNCTION | TF_FB_ADD_11_FUNCTION | TF_FB_ADD_12_FUNCTION | TF_FB_ADD_13_FUNCTION | TF_FB_ADD_14_FUNCTION | TF_FB_ADD_15_FUNCTION);
// A16..A19, OE, RW, CS_0
PTGPAR = (TG_FB_ADD_16_FUNCTION | TG_FB_ADD_17_FUNCTION | TG_FB_ADD_18_FUNCTION | TG_FB_ADD_19_FUNCTION | TG_FB_CS0_FUNCTION | TG_FB_OE_FUNCTION | TG_FB_RW_FUNCTION);
// D0..D7
PTHPAR = (TH_FB_D0_FUNCTION | TH_FB_D1_FUNCTION | TH_FB_D2_FUNCTION | TH_FB_D3_FUNCTION | TH_FB_D4_FUNCTION | TH_FB_D5_FUNCTION | TH_FB_D6_FUNCTION | TH_FB_D7_FUNCTION);
As you see, the ALE line is not used. This line could also be used as a second Flexbus CS line. If not configured for such uses it is available as GPIO bit 2 on port AS (pin 37 or K3, depending on package).
Regards
Mark
-
external Ram chip??
WHAT is the chip type?
-
Hi,
I am using the IS61C25616AL RAM chip. For interfacing to the processor seethe freescale development kit schematic.
Neil
-
HOW to use the IS61C25616AL in utasker??
Can you show you code???
CAN it use as the mcf52259's 64Kbyte SRAM????
I have see the example,it use the pointer!
Can it use as the SRAM if the address is continuous with the 64Kbyte SRAM !
So the RAM is 64K+outside RAM,don't like the pointer usage!
/********************************************************************/
//DES added mb_init code
void
mcf52259_mb_init(void)
{
static int i;
static int8 j;
static int tempi;
/*
* Enable MiniBus CS0 for MRAM access
*/
MCF_MB_CSAR(0) = (0
| MCF_MB_CSAR_BA(MRAM_ADDRESS));
MCF_MB_CSCR(0) = (0
| MCF_MB_CSCR_SWS(0)
| MCF_MB_CSCR_SWSEN(0)
| MCF_MB_CSCR_ASET(0) //DES was 3
| MCF_MB_CSCR_RDAH(0) //DES was 3
| MCF_MB_CSCR_WRAH(0) //DES was 3
| MCF_MB_CSCR_WS(1) //DES was 20
| MCF_MB_CSCR_MUX(0)
| MCF_MB_CSCR_AA(1)
| MCF_MB_CSCR_PS(1)
| MCF_MB_CSCR_BSTR(0)
| MCF_MB_CSCR_BSTW(0));
MCF_MB_CSMR(0) = (0
| MCF_MB_CSMR_BAM(0x007f)
| MCF_MB_CSMR_V(1));
/*
while(1)
{
for(i=0,j=0; i<0x80000; i++)
{
(*(vuint8 *)(0x80000000 + i)) = j++; //write
}
for(i=0; i<0x80000; i++)
{
tempi = (*(vuint8 *)(0x80000000 + i)); //read
}
}
*/
}