Closed Hoohaha closed 3 years ago
Hi @Hoohaha. This is a strange error! For some reason I don't recall seeing anything like this when I was working on the KL28 after we got the silicon back.
The AttributeError
exception is caused because the code in check_flash_security()
attempts to use AP#0 as a MEM_AP
object. It calls the read32()
method that doesn't exist because AP#0 is not detected as an AHB-AP due to the invalid IDR value.
The simple way to avoid the exception is to add a test in check_flash_security()
for isinstance(self.aps[0], MEM_AP)
. But that just avoids the exception, and you'll end up with a "no cores found" error. If there is a way to recover, we could add another init task that checks for this problem and recovers.
Some questions for you:
Anything else you know about the issue would be helpful. (We can chat by email if you want.)
Hi @flit ,
I met a strange problem on kl28z target. Sometimes there occur exception in
target\family\target_kinetis.py
:AttributeError: 'AccessPort' object has no attribute 'read32'
, I know it is hardware issue, but how to make it do not display AttributeError.Thanks.
Full logs: