Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Does Freescale MPC561 drive Data pins 23-0 when instructed to write a byte?

Status
Not open for further replies.

naseeam

Member
We write Embedded C for Freescale MPC561 Micrcontroller. It has 32-bit data bus. It is Big Endian. DATA0 is the most significant bit and DATA31 is the least significant bit.
This microcontroller is wired to external SRAM, Battery Backed RAM, etc.
I instruct this microcontroller to write a byte to a specific address of SRAM as follows:

static void sram_send(unsigned char volatile * const dst,
unsigned char const * src) {
...
..
/* prefetch 4 bytes at once */
long c = *++s;

/* then slam them out one at a time */
*dst = (unsigned_8 char)((c >> 24) & 0xff);
*dst = (unsigned_8 char)((c >> 16) & 0xff);
*dst = (unsigned_8 char)((c >> 8) & 0xff);
*dst = (unsigned_8 char) c;
...
}

Apparently, Microcontroller drives DATA31 to DATA24 when we instruct it to write a byte to SRAM.
DOES THE MICROCONTROLLER DRIVE DATA23 TO DATA0?

Here is the link for MPC561 Microcontroller.

https://www.freescale.com/webapp/sp...48&nodeId=0162468rH3bTdG06C18648&fromPage=tax
 
Status
Not open for further replies.

Latest threads

Back
Top