I am using the uVision 3 (ver. 3.72) tool and working with a Silicon Labs 8051F340 MCU. I need to map a device (an FPGA with registers) into external memory and access it with the MCU. There are not very many FPGA registers to access.
I am trying to use Split Mode without Bank Select and a multiplexed address/data bus. I'm looking for some guidance in setting up the target options, startup assembly code, and anything else that's necessary.
I have code compiling which is basically:
volatile uint8_t xdata *fpga_reg = (volatile uint8_t xdata *)0x1000; ... *fpga_reg = 0x12;
Thanks in advance for any help.
1) you need to set the SFRs that define your external memory interface right after STARTUP: in startup.a51. 2) I would not use a multiplexed data bus for a FPGA 3) look at XBYTE in the keil documentation
Erik
Thanks for the post.
I have a couple of follow on questions:
1) can you point me to which SFRs you are referring to that I need to initialize, or point me to an example that details this information.
2) why is using a multiplexed address/data bus bad for the FPGA?
Thanks.
1) can you point me to which SFRs you are referring to that I need to initialize, or point me to an example that details this information. the datasheet will tell you 2) why is using a multiplexed address/data bus bad for the FPGA? then you will have to demultiplex in the FPGA (which is, of course, possible - but)
1) Maybe I was a bit confused. I have code that initializes the EMI0CN, EMI0CF, and EMI0TC. It is in the C code after main is called. Are these what you are referring to? Or do I need to define the external memory region some other way?
2) I am counting on the FPGA to demux the address and data bus.
1) Maybe I was a bit confused. I have code that initializes the EMI0CN, EMI0CF, and EMI0TC. It is in the C code after main is called. Are these what you are referring to? Or do I need to define the external memory region some other way? the code before main pre-process xdata, thus it is imoerative that all meomory configuration is done at the start of (a local copy of) startup.a51
the code before main pre-process xdata, thus it is imperative that all memory configuration is done at the start of (a local copy of) startup.a51
Erik,
Do you have trouble keeping up with those keys on your keyboard that keep jumping around?
But it really is imoerative to care about your meomory configuration.
Besides, he just happens to have an understimulated ring finger requesting some attention.
Does there happen to be any examples of modifying STARTUP.A51 to accommodate an external device?
http://www.keil.com/support/man/docs/c51/c51_ap_customfiles.htm
View all questions in Keil forum