This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Why do I get ACI_STATUS_ERROR_INVALID_PARAMETER for every command I send?

I am communicating with the nrf8001 via SPI, from an HCS08 MCU. First thing I receive:

0x01 0x04 0x81 0x02 0x00 0x02

This makes sense, it tells me it is in setup state. I want to put it into test state, specifically for testing the ACI. So, I transmit:

0x02 0x01 0x02

I get acknowledgements of 0x00, 0x01, 0x00. Then, I receive:

0x01 0x03 0x84 0x01 0x85

According to the datasheet, this is an error, due to an invalid parameter. Okay, next I transmit an echo command:

0x04 0x02 0x47 0x48 0x49

I expect it to either tell me that it is in the wrong state, or, by some miracle, return the last three bytes. I receive:

0x01 0x03 0x84 0x01 0x85

Invalid Parameter. I have tried sending it various commands, even those with no parameters, such as the GetDeviceAddress (0x0A) or GetTemperature (0x0C). Yet, every time, I receive the same error: Invalid Parameter.

What could I be doing wrong?

Parents
  • I am running my own C program on the HCS08 MCU, which is only connected to the nrf8001. The SPI module in the MCU triggers an interrupt once the SPI buffer is full, then I store the data register in memory. When I send 0x02, 0x01, 0x02, I get 0x00, 0x01 and 0x00 in return, from the nrf8001. I do not have a logic analyzer, but I do use an oscilloscope. I did not find any C files at the project link. My HCS08 runs either assembly or C code. If you have any other examples, I would really appreciate it. I only send 0x00 when doing my read cycle. I am curious as to the meaning of these debug bytes that start every received message. For reference, here is my application controller code: [https://pastebin.com/ibWUdZd1]

Reply
  • I am running my own C program on the HCS08 MCU, which is only connected to the nrf8001. The SPI module in the MCU triggers an interrupt once the SPI buffer is full, then I store the data register in memory. When I send 0x02, 0x01, 0x02, I get 0x00, 0x01 and 0x00 in return, from the nrf8001. I do not have a logic analyzer, but I do use an oscilloscope. I did not find any C files at the project link. My HCS08 runs either assembly or C code. If you have any other examples, I would really appreciate it. I only send 0x00 when doing my read cycle. I am curious as to the meaning of these debug bytes that start every received message. For reference, here is my application controller code: [https://pastebin.com/ibWUdZd1]

Children
No Data
Related