Adding commands to the LimeSDR using the LMS64C protocol

Folks,
I am attempting to add a command to the comms path between the LimeSDR and my command line utility. I found the code in LMS64CProtocol.cpp and created a clone of the LMS64CProtocol::GetInfo() call, GetStatus(). I created a new command: CMD_GET_STATUS = 0x01, in LMS64CCommands.h . I created the same command in the NIOS code as well. The GetStatus() call sends the new command type and it returns but with the incorrect response, I get back STATUS_UNKNOWN_CMD. I never see the CMD_GET_STATUS even enter the NIOS command processing case.

Digging into the code I found that in fact, my command is exiting the PC but is apparently not reaching the NIOS, but is possibly being processed in the FX3 code, which has a command processing case statement like the NIOS. When I issue the CMD_GET_INFO command, the command does not even make it into the NIOS, as evidenced by not getting to the breakpoint I set in the NIOS code. The FX3 must be responding.

Another astonishing thing I discovered is that there is code in both the FX3 and the NIOS to process the CMD_BRDSPI16_RD, but for this command, the NIOS DOES respond to the command, not the FX3.

QUESTION 1:

How do you add a command to the LMS64C protocol on the LimeSDR, what is the procedure?

QUESTION 2:

What is going on that the FX3 responds to some commands and the NIOS responds to other commands. What decides that?

Thanks,
Ed

1 Like

The list of commands that are send to NIOS is here:

BOOM! thats the answer!
Thanks heavily!

Ed