Error message on write command

Home Forums Developers Discussion Firmware Error message on write command

This topic contains 6 replies, has 3 voices, and was last updated by  ususbantux@consultant.com 2 weeks, 5 days ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #694

    Roger
    Participant

    When I send a write command “openpet -c 7 0x0002 0x00000002” I see the command 32 bits followed by the payload 32 bits. I reply the command with bit 31 inverted during the payload. The command works on the DB but I get “WARNING Child still working on last command. 0x7F03 ”

    When I send a write command “openpet -c 7 0x8002 0x00000002” I see the command 32 bits followed by the payload 32 bits. I reply the command with bit 31 inverted during the payload. The command works on the DB but I get “WARNING Child command Timed out. 0x7F01 ”

    When I do a read command there is not an error message.

    #695

    Faisal
    Keymaster

    Roger,

    When you perform an SPI write, the child is expected to echo back the cmd + dst (or src) WHILE the write is happening.

    Take a look at this figure
    https://openpet-developers-guide.readthedocs.org/en/latest/_images/spi_write.png

    In software this is implemented on SB here
    https://bitbucket.org/openpet/supportboard/src/default/sw/main/app/cmd.c?t#cmd.c-175

    This is how DB saves the CMD id on the tx buffer
    https://bitbucket.org/openpet/detectorboard16chlbnl/src/default/sw/app/db_cmd.c?#db_cmd.c-108

    #711

    Roger
    Participant

    http://i64.tinypic.com/8zfgab.jpg

    image for above

    • This reply was modified 1 year, 7 months ago by  Faisal.
    #712

    Faisal
    Keymaster

    I think this is normal. You need to emulate whatever we are doing in NIOS software to get your firmware to work like ours.

    #714

    Roger
    Participant

    Looking at the flow diagrams for the SPI I think every thing is working as designed. All the commands for read or write works correctly. At this point I do not see any problems.

    #715

    Faisal
    Keymaster

    No this is not the proper way to handle the commands.
    You have to fix your code to work as spec.

    If you want to debug.

    start “Nios II 13.1 Command Shell”
    then type
    nios2-terminal

    look at the SPI transactions, you will see that you are not returning what SB is expecting.

    You can even post an image of SPI transactions here.

    #948

    may be i will try

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.