Running on the development board is OK; there is a problem with running your own board
[ 233.110000] Kernel bug detected[#1]:
[ 233.110000] Cpu 0
[ 233.110000] $ 0 : 000000002ae5c001 00000001 00000020
[ 233.110000] $ 4 : 000000018201ba80 00000010 395af224
[ 233.110000] $ 8 : 31009c011000001e 00000000 fffffff4
[ 233.110000] $12 : 7fdfe748000000e9 614d7965 024e0000
[ 233.110000] $16 : f62000008197df30 8064ea20 80000000
[ 233.110000] $20 : 395af25000000005 00000006 00000007
[ 233.110000] $24 : 00000092395af244
[ 233.110000] $28 : 8197c0008197df08 00000008 80210d00
[ 233.110000] Hi : 00000000
[ 233.110000] It : 01b77018
[ 233.110000] epc : 80210d30do_ade+0x1c0/0x598
[ 233.110000] Not tainted
[ 233.110000] ra : 80210d00do_ade+0x190/0x598
[ 233.110000] Status: 31009c03 KERNEL EXL IE
[ 233.110000] Cause : 10800034
[233.110000] PrId: 00019555 (MIPS34Kc)
[ 233.110000] Modules linked in: mdrv_ir
[ 233.110000] Process k1_linux1 (pid: 300, threadinfo=8197c000,task=8201ba80, tls=2aad0af0)
[ 233.110000] Stack : 8197c000 8197df30 00000008 006712c0 31009c03020e84da 395af274 020e84da
[ 233.110000] 395af27480200404 003d0f00 65aa7050 65aa7518 65aae940 38a521e0 395ae270
[ 233.110000] 000000002ae5c001 022def68 0066c88c 38ac1a08 0066ce08 0000000e 395af224
[ 233.110000] 38ac1a080066c694 00000000 fffffff4 7fdfe748 000000e9 614d7965 024e0000
[233.110000] 020e84da395af274 020e84da 395af274 395af250 00000005 00000006 00000007
[ 233.110000] ...
[ 233.110000] Call Trace:
[ 233.110000] [<80210d30>] do_ade+0x1c0/0x598
[ 233.110000] [<80200404>] ret_from_exception+0x0/0x10
[ 233.110000]
[ 233.110000]
[ 233.110000] Code: 00021402 38420001 30420001<00028036> 0c089285 24040001 0c0f8280 00000000 000211c0
The kernel prints the above information, and the program hangs;
After testing, the above problems did not occur after replacing the nor flash;
It may be the problem of nor flash, and the selection list of nor needs to be provided;
FAE proposes another tracking solution: add printing information to the kernel driver; see which step has an error;
f_hidg_write() function in kernel/drivers/usb/gadget/f_hid.c
recompile the test;
Due to the time relationship, the above method is a test;
FAE: To stress test:
Transfer the file bash to the /bin/ directory
Then upload the script StorageMedia-Test.sh to the development board
Run the script.
Select root directory /
choose 1 or 5
choose 1 or 2
Automatically stop if there is an error
FAE: test with new u-boot
FAE: Reduce memory test usage
In the drawing review suggestion given by FAE, the serious problem is the voltage wiring problem of CPU and MEM, which will affect the system performance.
stability.
Decrease the CPU frequency or DDR frequency and try running your code.
Specific modification method:
uboot中
#define CONFIG_SYS_APLL_FREQ 1008000000
#define CONFIG_SYS_CPU_FREQ 1008000000
Temporarily change the above two values to 800000000 and try
If not, modify on this basis
#define CONFIG_SYS_MEM_FREQ 200000000
The value should be 150000000 or 100000000
FAE: Compare the printing information of the usb-hid normal and faulty boards:
The left side is OK, the right side is problematic, the USB is not detected when the system is up
FAE: Because our code has usb_dete pin by default, it is used for plugging and unplugging detection of usb plugging and unplugging. I saw that your board does not have this pin, and the code needs to be modified.
The usb driver is not loaded and the communication is unsuccessful
Find the problem: Remove the USB-dete detection pin .docx document to configure according to the following method.
problem solved! ! ! ! !
The USB part of the original schematic diagram of the Innocent solution is designed with detection pins:
The modified schematic is as follows:
If the software is not changed, an inexplicable error will occur:
Segmentation fault (see the description of 10-usb-hid kernel error Segmentationfault analysis)
The kernel configuration is as follows:
Make menuconfig
DeviceDrivers
->USBSopport
->(*)Boardhas no plug detect facility
recompile;
Run OK.
by the way:
Some devices are only used as slave device devices
The following configuration can be removed from the kernel configuration:
DeviceDrivers
->USBSopport
->()Support for Host-side USB