Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AECP in-progress responses in firmware upgrade should be polled rather than checked once #303

Open
larry-xmos opened this issue Oct 7, 2016 · 2 comments

Comments

@larry-xmos
Copy link

larry-xmos commented Oct 7, 2016

Firmware upgrade fails in erase step if end station is taking some time to erase its non-volatile memory:

$ upgrade upgrade.bin
Erasing image...

[NOTIFICATION] (RESPONSE_RECEIVED, 0x2297fffe80081b, START_OPERATION, ENTITY, 0, IN_PROGRESS, 0x1)

[LOG] ERROR (RESPONSE_RECEIVED, 0x2297fffe80081b, START_OPERATION, ENTITY, 0, 36, IN_PROGRESS)
Error: Erase failed.

cmd_line::cmd_firmware_upgrade does a START_OPERATION command and calls get_last_resp_status once to get status. This seems to simply wait for the first response packet to arrive and return its status field.

My XMOS end station takes about 3 seconds to erase its flash and will send IN_PROGRESS responses every 120ms and finally a SUCCESS at the end (see process_aem_cmd_start_abort_operation in https://github.com/xmos/lib_tsn/blob/master/lib_tsn/src/1722_1/avb_1722_1_aecp.c).

Also, I noticed cmd_firmware_upgrade uses hardcoded 3 for AEM_MEMORY_OBJECT_OPERATION_ERASE.

@andrew-elder
Copy link
Collaborator

@larry-xmos - thanks for the error report. Patches and pull-requests welcomed!

@franczc
Copy link

franczc commented Oct 9, 2016

@andrew-elder, @larry-xmos: We experienced the same issue and had resolved it in our internal repository. I'll work to get the fix pushed upstream in a day or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants