As I said before, when you just get the ARM bare board, the first thing to do is to power it on. But before powering on, it is best to test whether the power supply and ground are short-circuited. Then you can power it on. I usually use a regulated power supply so that you can see the current. If the current is too large, it means that there may be a problem with the hardware. Touch the chip on the board with your hand to see if it is hot, and check whether the power supply voltage of each power module is normal. If the ARM board is normal, you can start. Based on my personal experience, the following introduces the debugging steps and possible problems:
1. Connect to the emulator and read and write registers
Plug the hardware emulator into the JTAG port of the ARM board, and then connect it to the PC. Nowadays, ARM emulators seem to be connected to the PC via USB. After the connection is completed, power on the board and then open the debugging software on the PC. I am using the ARM11 emulator here, and the debugging software is AXD. If AXD recognizes the ARM processor, it means the connection is successful. If it does not recognize it, there is a problem.
(1) Confirm that all power supplies for the ARM processor are correct
(2) Confirm the RESET pin of the ARM processor
(3) Check whether the crystal oscillator of the ARM processor is vibrating
(4) Confirm whether the JTAG interface is correct
If the above 4 items are normal, the emulator should be able to find ARM.
2. Initialize the ARM processor and DRAM through the script
Since it is a bare board, ARM has not been initialized after powering on. Generally, a script is executed to perform a basic initialization on ARM. The script is usually a txt file, for example:
setmem 0x36001004 0x4 32
setmem 0x36001010 0x40d 32
setmem 0x36001014 0x6 32
setmem 0x36001018 0x3 32
setmem 0x3600101c 0xf 32
setmem 0x36001020 0xf 32
setmem 0x36001024 0xf 32
mem 0x36001000 +1 32
mem 0x36001004 +1 32
mem 0x36001008 +1 32
mem 0x3600100c +1 32
….
The above script commands are used for AXD software, where the "setmem" command means setting a value to a certain address, and the "mem" command means reading a value from a certain address and printing it out. Through these two commands, you can set the registers inside the ARM and read the values of the registers. The main function of the script is to initialize the ARM, generally including turning off Interrupt and watchdog, configuring the clock, configuring GPIO, and configuring the DRAM controller.
How to run a script in AXD? First, select "System Views" in the AXD menu, then select "Command Line Interface". A window will pop up, and enter the following command in the window:
ob c:/init.txt
This command means running the script command in init.txt in the root directory of drive C. As shown in the figure:
After the script is finished running, the ARM and DRAM on the board should have been initialized. Now you can test the read and write memory. Select "Process Views" in the menu, then select "Memory", enter the DRAM address, and then modify the values above some addresses. The changed values will turn red. If they can be modified, it means that the DRAM should be working properly. Here is a screenshot:
3. Download the program to DRAM via AXD and run it
The next step is to download the program to DRAM and run it. The main purpose is to use the program to burn the bootloader. Today's ARM processors are very powerful and support multiple boot modes. Depending on the different boot modes, the bootloader needs to be burned to different media. Select "File" in the AXD menu, then select "Load Memory from File...", and a window will pop up as follows:
As shown in the figure, enter the downloaded address in "Address", which is the running address of Loader_RAM.bin. After the download is successful, open the serial port, and then enter the command "setpc 0x50000000" in the "Command Line Interface" of AXD to point the PC pointer to the address 0x50000000, and then enter the command "go" to start running.
4. Burn the bootloader and start the ARM board
After the downloaded program is run, the bootloader can be burned into Nandflash, NORflash or SD card through the program, depending on the boot mode supported by the board. This program can download the bootloader through the serial port. Another way is to pause the program in AXD, then download the bootloader to DRAM through the emulator, and then resume the program in AXD and burn the downloaded bootloader into flash or SD card through the program downloaded at the beginning.
After the burning is successful, turn off the power, unplug the JTAG of the emulator, and power it back on. At this time, the bootloader in the ARM board can run.
After the bootloader is running, the work becomes easy. Today's bootloaders are very powerful. Linux has uboot and WinCE has Eboot, both of which support burning, downloading and other functions. Generally, if you buy a development board, it will provide a burning tool. However, after replacing DRAM and Nandflash, the burning tool may also need to be re-debugged. And the bootloader used also needs to be modified.
Previous article:Brief Introduction to Debugging 6410 on ARM Bare Board
Next article:ARM bare board program compilation process
Recommended ReadingLatest update time:2024-11-15 15:03
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- [Evaluation of EC-01F-Kit, the NB-IoT development board of Anxinke] - Unboxing and comparison with other modules
- Have fun at work!
- How to rotate components and modules in Allegro software?
- 【Chuanglong TL570x-EVM】HELLO_WORLD of python!
- Help!!! Insufficient stall current!
- 【NXP Rapid IoT Review】+ My Review Summary
- VHDL Introduction. Questions and Answers. Classic Examples. Experience Summary
- ROM and RAM How does the microcontroller execute step by step after power is turned on?
- How does the program execute from the reset sequence to the main function?
- [AutoChips AC7801x motor demo board review] + Motor drive - BLDC sensorless method