AnsweredAssumed Answered

CW, MQX, PE, Flexbus

Question asked by Steven Harrington on May 5, 2014
Latest reply on May 22, 2014 by Steven Harrington

I am trying to get the flexbus working with an 8 bit peripheral. I have CW, MQX and PE installed and working.

hardware designer, haven't written C for a long time, never used Eclipse before, or any real time OS so some things that are obvious to an experienced software person might need a little extra explanation.
I have two questions, first is getting the flexbus setup correctly, the second is about removing stuff I don't need without breaking the compile.

I have a tower k60F system wired up to some external hardware. I have successfully compiled and run the PE demo. Then I added some PE LDD components (GPIO and SPI slave) and moved the RS232 port to different pins. I can toggle the GPIOs and the RS232 port works in it's new location. I haven't tried the SPI interface yet but I expect it to work OK because the PE configuration was straightforward.

The problem is with the flexbus interface and CW / MQX / PE combo.  PE says that the flexbus is configured in MQX. In init_hw.c there are the following lines:








I know it's using the pe_initialize because I edited the bsp_initialize files but it didn't have any effect. The pe code is generated so I can't edit it, but it does have a call to a user init. I found the file that calls the user function once but I can't seem to locate it again. Can someone tell me where it is so I can get the name of the function I need to write to initialize the flexbus the way I want it.

I found in other discussions that the address used for the MRAM and LCD are cachable so I should move my peripheral up to A000000 if I don't want to turn off caching. I will be using CS0 and CS1 so I have to overwrite the flexbus settings that are generated for the MRAM and LCD. I don't need the MRAM or LCD config so how do I get CW / PE to stop generating the flexbus config for them without breaking something in the compile?

The external devices are DS26521 T1 framers. I have actually managed to read the ID because the mram config was close enough for some data to come out but I know the bus isn't correct yet and the caching probably didn't help either. I am sure I can get it to work right I just need a couple pointers to the right files to edit to get the flexbus set up correctly.