Hi,
I can try to help you, but 1. I did not try this myself, and 2. I do not know which devices are present on the MCF5329EVB.
I am not sure what you mean by "reading and writing the data bus". As you write about D[31:0], I guess the MCF5329EVB uses shared bus mode with non-DDR SDRAM connected to the whole data bus? In any case, you need a chip select signal to determine if any other device on the bus or your "port" is accessed.
The keyword chip select leads directly to Flexbus, which you have to set up. So the basic steps are:
1. select a chip select you want to use for the access, e.g. CS3
2. program the chip select address register (CSAR3, 0xFC00_8018 in our example) to a currently unused address in the range of 0x0000_0000–0x3FFF_FFFF or 0xC000_0000–0xDFFF_FFFF (these are the only allowed ranges according to the data sheet)
3. program CSMR3 to a proper value - if you just want to read one "value", you can set it to 0x0000_0001 (64k Range, R/W allowed, Valid)
4. program CSCR3 - this is probably the most difficult part, because you have to know what timing you need. For a simple start, you probably only need the lower 16 bits and van set the upper 16 bits to 0x0000. Also, if TA is not generated externally, remember to set AA and a proper value of WS. (My guess: use something like 0x0000XX00 (32bit bus-size) with XX being replaced by the proper values of WS and SBM=0 and AA=1. In case my above assumption was wrong and the EVB uses DDR SDRAM, use 0x0000XX80 and set SBM=1 - but in this case, you can only use 16bits of the data bus for this access!)
Then you should be able to access the "port" in the address region you programmed in CSAR3.
I hope this is what you wanted to know? :smileyhappy:
Regards, Wolfgang
Message Edited by WolfgangW on 2007-05-16 04:58 PM