Memory Transfer Fault connecting to STM32H743ZI2
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 560
- Avg merge
- 1h 41m
- Merged PRs (30d)
- 3
Description
I'm using Mbed studio to try and debug on a STM32H743ZI2, and it fails with a read error like:
0000860:WARNING:rom_table:Invalid coresight component, cidr=0x0
0000861:WARNING:rom_table:Invalid coresight component, cidr=0x0
0000862:ERROR:rom_table:Error attempting to probe CoreSight component referenced by ROM table entry #5: Memory transfer fault (read) @ 0xe00f0fbc-0xe00f1043
Traceback (most recent call last):
File "/home/dan/.config/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/coresight/rom_table.py", line 358, in _read_table
self._handle_table_entry(entry, entryNumber)
File "/home/dan/.config/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/coresight/rom_table.py", line 408, in _handle_table_entry
cmpid.read_id_registers()
File "/home/dan/.config/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/coresight/rom_table.py", line 113, in read_id_registers
regs = self.ap.read_memory_block32(self.top_address + self.IDR_READ_START, self.IDR_READ_COUNT)
File "/home/dan/.config/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/probe/stlink_probe.py", line 271, in read_memory_block32
return conversion.byte_list_to_u32le_list(self._link.read_mem32(addr, size * 4, self._apsel))
File "/home/dan/.config/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/probe/stlink/stlink.py", line 385, in read_mem32
return self._read_mem(addr, size, Commands.JTAG_READMEM_32BIT, self.MAXIMUM_TRANSFER_SIZE, apsel)
File "/home/dan/.config/Mbed Studio/mbed-studio-tools/python/lib/python3.7/site-packages/pyocd/probe/stlink/stlink.py", line 343, in _read_mem
raise exc
pyocd.core.exceptions.TransferFaultError: Memory transfer fault (read) @ 0xe00f0fbc-0xe00f1043
Resetting target
A minimal command that causes this is:
pyocd cmd -c reset
Repeatedly trying to reproduce this shows the fault happens at particular addresses: 0xe00f0fbc-0xe00f1043 or 0xe000efbc-0xe000f043
See logs:
mbed-studio.log
minimal.log
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing pyocd cmd -c reset with the STM32H743ZI2 and compare the attached logs. Read pyocd/coresight/rom_table.py at _read_table, _handle_table_entry, and read_id_registers, then follow the transfer through pyocd/probe/stlink_probe.py and stlink.py. Done means reset no longer produces the reported CoreSight probe fault at the failing addresses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100