Using peripherals connected on Flexbus

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Using peripherals connected on Flexbus

1,285 次查看
deuteron
Contributor II

How do I define peripherals, or external RAM, that I want to be memory-mapped on the Flex-Bus? I cannot see an appropriate object in the Component Library of the CodeWarrior IDE. My peripheral has a 16-bit wide R/W connection on the flexbus and has 64 consecutive addressable registers. I need to set up base adress, wait states, and to define that I am using a 16-bit multiplexed address/data with an ALE pin. The configuration registers exist in the processor, and I can write directly to these, but I want to use the component library and its built-in checks.

0 项奖励
回复
3 回复数

672 次查看
jvasil
Contributor III

I guess I'm in much the same state as Jacob was in 2011 for I also expected a LDD for the FlexBus (ditto for the FlexMemory).  I don't see anything named "external bus" under the processor.  I'm not sure if this is because I'm using a different processor (I'm using a MK64FN1M0VLQ12) or if this represents a change in PE in the year since the previous post.  However, I do see an Init_FB (Init_FMC) component and am wondering if these two init modules represent all the support for the FlexBus and FlexMemory peripherals that are provided by Processor Expert?  Thanks!

p.s. I'm using PE version 10.3.0

0 项奖励
回复

672 次查看
deuteron
Contributor II

I wrote this question very early in my experience with Processor Expert. I was expecting to see an LDD (logical device driver) bean for the Flexbus, whereas it is in fact an option inside the CPU bean, called "external bus"

0 项奖励
回复

672 次查看
keithgw
Contributor I

#define MEM_BASE   0xA0000000L  //!< Starting address for RAM

#define MEM_BASE_PTR  ((uint16_t *) FPGA_MEM_BASE)

uint16_t value;

 

uint16_t  *mem = MEM_BASE_PTR;

 

//write 1 to memory

mem[0] = 1;

 

//write 2 to next memory

mem[1] = 2;

 

//read out memory

value = mem[2];

0 项奖励
回复