PE & Flexbus config for K70

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PE & Flexbus config for K70

Jump to solution
1,094 Views
crezyoz
Contributor IV

I've got most ofmy flexbus init set up but I am a bit confused about setting the memory blocks.

 

I set the base address of CS1 to 0x60000000 and now I want to m or I suppose I need to, set up the single memory block I will be using. It's actually an ADC with only 12 16 bit registers.

 

Start Address xxxxxx

Memory Size 0x0a

memory type ROM

 

What do I set the memory bock Start Address to ?

 

And what would the final address be for access?

 

Thanks!

 

 

0 Kudos
1 Solution
850 Views
crezyoz
Contributor IV

Thanks again Pter.

 

The problem was resolved by turning on CS0. After much trial and error I found that CS0 had to be enabled. The manual only states that CSO is the "Global Chip Select" but fails to mention that you will get bus faults if you do not have it enabled, regardless of which CSx you are actually using.  Another case, Pter, where Many, many hours were spent chasing ghosts. I realize that while I am starting with the MPU I may ask some stupid questions, or phrase them incorrectly because I am not fully conversant with the MPU/CW yet,  but it would be fantastic if the documentation was much more accurate.

 

 

I appreciate your patience Petr.

View solution in original post

0 Kudos
6 Replies
850 Views
crezyoz
Contributor IV

I set Memory Block1 to 0x60000000, 32 bytes long

 

But I get a bus fault when accessing it.

 

ie:

someUint16 = *((uint16 *)0x60000000);

 

Do I have to do anything with the MPU, which is disabled at the moment?

0 Kudos
850 Views
crezyoz
Contributor IV

Is it a bus fault because the FlexBus isn't powered , or clocked?

0 Kudos
850 Views
crezyoz
Contributor IV

please help!

0 Kudos
850 Views
crezyoz
Contributor IV

I have narrowed the problem down to the CS1 settings. I don't know why but if I set the FB_CSPMCR bits 31:28 to 0 I no longer get the bus fault. But , as I understand this, that means I don't have the CS anymore on the output pin. It will now be ALE?

 

I am not using ALE in the design since I only have to read from a device using the CS and RD lines. How to I get around this one?

 

The code does run when I do not have CS1 as the chosen pin of the multiplex register.

 

ANY RESPONSE from FREESCALE welcome!

 

 

0 Kudos
850 Views
ProcessorExpert
Senior Contributor III

It's difficult to tell where the problem comes from. Please write more details on your the hardware and connections. What pins do you connect to ? What converted do you use? Do you use Freescale or your own board?

 

best regards
Petr Hradsky
Processor Expert Support Team

 

0 Kudos
851 Views
crezyoz
Contributor IV

Thanks again Pter.

 

The problem was resolved by turning on CS0. After much trial and error I found that CS0 had to be enabled. The manual only states that CSO is the "Global Chip Select" but fails to mention that you will get bus faults if you do not have it enabled, regardless of which CSx you are actually using.  Another case, Pter, where Many, many hours were spent chasing ghosts. I realize that while I am starting with the MPU I may ask some stupid questions, or phrase them incorrectly because I am not fully conversant with the MPU/CW yet,  but it would be fantastic if the documentation was much more accurate.

 

 

I appreciate your patience Petr.

0 Kudos