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:
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:
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.
: -------------------- ...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