MFC5329 - Cannot Write to Internal Register Space

cancel
Showing results for 
Search instead for 
Did you mean: 

MFC5329 - Cannot Write to Internal Register Space

1,795 Views
Reibax
Contributor I

    I am trying to get some USB-device functionality in a MCF5329 based board, and I am finding some trouble when trying to get the device initialised.

    I cannot change the value of some registers like USB Mode Register (0xFC0B_01A8). When the system is started their value is 0x0000_0000 and it stays that way whatever I do.

   I've tried the following pieces of code, and the result is the same:

       - Code automatically generated by the Beans in CodeWarrior 7.0
       - Code automatically generated by CodeWarrior 6.2 ==> Hello World Application, with a line of code trying to change the value of USB Mode Register
       - Code from MCF532XSC usb_dev_mouse downloaded from:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MCF532X&nodeId=0162468rH3YTLC00M92076...

    I am quite certain that it is not a problem with the debugger interface of CodeWarrior because if I output the value of the register through the serial line I get the same result: 0x0000_0000 .

    I've also performed another two alternative tests that I know that wouldn’t be valid in a final design, but I have once again failed to change the value of those registers:

                - I’ve added this line to the .cfg file used by CodeWarrior for initialising the microcontroller:

 

Code:
writemem.l 0xFC0B_01A8 0x00000006

                -I’ve tried to alter the value stored in the register with the memory window from CodeWarrior’s debugger after including this line in the .mem file:

 

Code:
range    0xFC000000 0xFFFFFFFF 4 ReadWrite

                I don’t know what else I can do to get this solved. ¿Does anybody know what I am doing wrong? Any help will be highly appreciated. If you need any code or further explanation, please don’t hesitate to ask.

Thanks in advance for your time and help.

Labels (1)
0 Kudos
5 Replies

118 Views
mmerino
Contributor I
Hi,
 
I have same problem as you. I can not write any of the registers of the USB. They appears as zero initialized and it is not possible to write them.
 
Have you been able to solve the problem?
 
In my case the CIR register is 1582 and it does not match to any MCF5329 micro as per the Reference Manual...
 
regards,
0 Kudos

118 Views
Reibax
Contributor I
Problem located an solved:

This situation was caused by a bad hardware implementation: L13 not being connected to GND was causing this annomalous behaviour.
0 Kudos

118 Views
Reibax
Contributor I
¿Could this be related with the fact that I am using the PCF5329 version of the processor?
0 Kudos

118 Views
Reibax
Contributor I
I've tried doing several Memory Tests using the Hardware Diagnostics tool in CodeWarrior, an this has been the output every single time:


Code:
:  -------------------- ...Connected ============================================  Number of Passes: 1 Address Range to Test: 0xFC0B01A8 - 0xFC0B01B7 Access Size: Long Word Tests to be run:       Walking Ones Test      Address Test      Bus Noise Test Testing will be host based ============================================ Tue Mar  4 14:45:31 2008   Pass #: 1 Walking Ones Test ... Failed Total Number of Memory Failures Detected: 256   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x00000001 Actual:   0x00000000   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x00000003 Actual:   0x00000000   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x00000007 Actual:   0x00000000   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x0000000F Actual:   0x00000000   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x0000001F Actual:   0x00000000   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x0000003F Actual:   0x00000000   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x0000007F Actual:   0x00000000   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x000000FF Actual:   0x00000000   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x000001FF Actual:   0x00000000   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x000003FF Actual:   0x00000000   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x000007FF Actual:   0x00000000   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x00000FFF Actual:   0x00000000   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x00001FFF Actual:   0x00000000   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x00003FFF Actual:   0x00000000   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x00007FFF Actual:   0x00000000   Subtest: Walking 1's            Address: 0xFC0B01A8 Expected: 0x0000FFFF Actual:   0x00000000Tue Mar  4 14:45:31 2008   Pass #: 1 Address Test ... Failed Total Number of Memory Failures Detected: 4   Subtest: Address            Address: 0xFC0B01A8 Expected: 0x00000001 Actual:   0x00000000   Subtest: Address            Address: 0xFC0B01AC Expected: 0x00000002 Actual:   0x00000000   Subtest: Address            Address: 0xFC0B01B0 Expected: 0x00000003 Actual:   0x00000000   Subtest: Address            Address: 0xFC0B01B4 Expected: 0x00000004 Actual:   0x00000000Tue Mar  4 14:45:31 2008   Pass #: 1 Bus Noise Test ... Failed Total Number of Memory Failures Detected: 8   Subtest: Sequential Indexing, Pseudo Random Data            Address: 0xFC0B01AC Expected: 0x54909DF9 Actual:   0x00000000   Subtest: Sequential Indexing, Pseudo Random Data            Address: 0xFC0B01B0 Expected: 0x603F8F01 Actual:   0x00000000   Subtest: Sequential Indexing, Pseudo Random Data            Address: 0xFC0B01B4 Expected: 0xD30D591F Actual:   0x00000000   Subtest: Sequential Indexing, Fixed Pattern Data            Address: 0xFC0B01A8 Expected: 0x12345678 Actual:   0x00000000   Subtest: Sequential Indexing, Fixed Pattern Data            Address: 0xFC0B01AC Expected: 0xEDCBA987 Actual:   0x00000000   Subtest: Sequential Indexing, Fixed Pattern Data            Address: 0xFC0B01B0 Expected: 0x54545454 Actual:   0x00000000   Subtest: Sequential Indexing, Fixed Pattern Data            Address: 0xFC0B01B4 Expected: 0xABABABAB Actual:   0x00000000   Subtest: Converging Indexing from 5's and A's, Fixed Pattern Data            Address: 0xFC0B01A8 Expected: 0x12345678 Actual:   0x00000000 ============================================  Completed Passes: 1 Total Number of Failed Tests:    3 Total Number of Failed Accesses: 268 ============================================ Timestamp:  Tue Mar  4 14:45:31 2008

 ¿Can this prove that there is something wrong either in the .cfg initialization file or in the hardware itself?

0 Kudos

118 Views
Reibax
Contributor I
Ok, I'm starting to run out of ideas and i really need to get this to work.

I am starting to suspect that I have some sort of hardware design fault.

Are USB registers dependent on any external signal?

My USB device implementation has got basically USB_M and USB_P signals, plus the pull-up signal, plus usb_vcc to the microcontroller. Do I need anything else for it to work?
0 Kudos