XCP-Download command problem
mladjaa opened this issue · 13 comments
Hello, I am using XCP protocol for communication with ECU in Python. When I want to write value inside of ECU, I use SET_MTA command, got message from slave "FF" as success, then I use Download command to write value in ECU and always slave respond "FE 23". I found that in error list "Memory location is protected to write". When I try to send same command for same memory location in CANape software, there are no errors (return FF as good and writes value on wished address).
Do you know what is the possible problem for this and how to solve it?
Without context information, I would guess a side-effect of an UNLOCK operation?
Could you post the pyXCP code sequence your are using and most important, the CANape trace, esp. during setup?
You should also capture the CANape connection part
The excel trace does not contain the TX messages were the XCP commands are sent. Please provide a complete trace recorded when CANape is doing the connect and download
Honestly, I don't know why you are completly bypassing pyXCP...
Are you sure this is a CANape trace?
One would expect CANape issuing GET_STATUS, GET_COMM_MODE_INFO, GET_ID commands after CONNECT.
Yes, but this trace is from beginning, I don't know why skiped CONNECT command.
Let's focus please on Python code and DOWNLOAD command problem with error "FE 23"-memory location is protected to write. I found in XCP documentation that parameter which you want to change, first of all, needs to be moved from Flash to RAM, but I am not sure how to do this.
Have you any idea?
The movement is usually done with SET_CAL_PAGE
. In the first step you should consult your A2L (if available),
MOD_PAR
/MEMORY_SEGMENT
s, maybe your address is pageable to RAM.
Optional commands GET_PAG_PROCESSOR_INFO
, GET_SEGMENT_INFO
, and GET_PAGE_INFO
may also helpful.
I resolved problem with command "SET_CAL_PAGE".
Thank you for your support!