MCF52259 CCE register Bit 14 - what does it do?

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

MCF52259 CCE register Bit 14 - what does it do?

694 Views
Mudwog
Contributor I

Hello,


CCE Bit 14
In the reference manual for the MCF52259 family (section 13.3.4), I accidentally bumped into a very brief indication that there is a CCE register.  This 16 bit register  has only two bits defined.  The one I'm interrested in at the moment, Bit 14, is called "USB END":
0 Big endian disabled
1 Big endian enabled

The example code that I've managed to dig through sets this to zero and uses up a considerable amount of code writing things into the BDT in LittleEndian. 

 

Is there anyone who knows what this bit does?
Can the BDT be Bigendian?, ...
or, does this bit apply to something else?, ...
and if so what?

I haven't been able to find any clarification in the reference manual.

 

Thanks,

Mudwog

Labels (1)
0 Kudos
4 Replies

382 Views
TomE
Specialist II

> CCE Bit 14
> In the reference manual for the MCF52259 family (section 13.3.4),

 

What version of the manual? I've got Rev 3 and Rev 4 and neither of them have a "USB END" bit documented in that section.

 

The Revision History Appendix documents a change to the CCE between Rev 0 and Rev 1 - are you looking at a Rev 0 manual?

 

Searching the forum for "BDT Endian" finds your last post on this subject on 8 November.

 

I can find reference to "USB Endian" control in MPC parts (ES in MPC5125), and also in the "USB Mode" register in the USB controller in the MCF5329. That controls the byte order for DMA transfers, but says it has to be set to "1" (big endian) for "proper operation", to match the CPU.

 

I'm comparing the USB register sets in the MCF5329 and MCF52259. They're nothing like each other. The MCF5329 one is documented as an EHCI controller, and it matches the registers in the Intel EHCI specification. But what is the MCF52259 one? It doesn't seem to match either the EHCI or OHCI specifications. Is it some sort of "device-end" USB controller that can be persuaded to do some host-end work?

 

Tom

 

0 Kudos

382 Views
mjbcswitzerland
Specialist V

Hi

 

The USB controller is a little-endian implementation. In the M52259 there was a bit added to control the possibility to switch between little and big endian mode (Coldfire code would be more efficient if the USB controller could operate in big-endian mode since it would not be necessary to convert pointers between big and little endian representation).

 

However the USB controller in the M52259 can't change modes and so the register control was not implemented. It was only mentioned in the original version of the user's manual (around end of 2008) and was already removed in Rev. 1.

 

In the original example software which came with the very first version of the Kirin3 kit there was this note:

 

The MCF5225x has a new register, the Chip Configuration Extension (CCE) register.  
It offers a few extra configuration options for the USB & MiniBus.

Unfortunately for the 1st rev of the silicon the default reset state is incorrect.  
The USB END bit gets set to 1 which configures it for USB Big Endian input.  This is not compatible with the CMX USB stack, which requires Little Endian input.

To fix this issue only two lines of code are required in the target.c file of the CMX USB-Lite stack.

1) Add this register define at the top.

#define MCF_CIM_CCE             (*(hcc_reg16*)(&_IPSBAR[0x110010]))

2) Add this to the init_scm() function.

MCF_CIM_CCE = 0x0;

 

 

This is also quite curious since the bit (although it doesn't do anything) used to reset to '1' and this supposedly stopped the CMX USB-Lite software from working. It may be that the bit did originally affect "something" but not as intended.

 

Since it no longer exists it can now be ignored.

 

Regards

 

Mark

 

 

0 Kudos

382 Views
TomE
Specialist II

Thanks for clearing that up, Mark.

 

That "1st rev of the silicon" must have been for preliminary prototype parts as the current MCF52259DE.pdf "MCF52259 Chip Errata, rev 0, 04/2011" is for "Silicon Revistion: All" and doesn't mention any problems with the CCE register.

 

Tom

 

0 Kudos

382 Views
Mudwog
Contributor I

Hello,

I was well past the point of manipulating the BDT in my USB driver when I made the initial post.  I was using rev 0 of the manual which came on the CD with my development board.

 

After a few go arounds I was able to download Rev 4 of the reference manual, and sure enough there is no mention of CCE bit 14.  I looked and searched and found that there is also no mention anywhere in the reference manual that the BDT is little endian.

 

I am making progress poking a stick at the USB silicon.

 

The historical information is interresting.

thanks,
Mudwog

0 Kudos