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

nrf8001 setup

Very new, so please forgive the questions, but...

I have an nrf8001 that I've powered up. After initial power up, I'm able to read the DeviceStartedEvent but the response doesn't seem to follow spec. This is what I see:

BlueLE_Read:(80) 20 81 40 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 READ EVENT: ACI_EVT_DEVICE_STARTED

0x40 0x00 0x40, what are these? They do not seem to be defined in the documentation and I cannot set the SPI interface for read/write after this happens.

  • Please make sure you have the correct endianness. The ACI interface is Least significant bit first. You can use the ble_aci_transport_layer_verification template (echo command) to verify your SPI implementation. Please refer to the nRF8001 product specification for more details on the ACI interface.

  • Thanks for the reply, but I'm a little confused by this. The response is being bit-banged off the SPI interface 1 byte at a type and the responses of the DeviceStartedEvent are 1 byte words. I don't think this is an Endian problem.

    According to the spec, my payload would parse as:

    • 80 - debug byte
    • 20 - payload size
    • 81 - device started event indicator
    • 40 - ???? but should be operating mode should be 0x01, 0x02, or 0x03
    • 00 - ???? hardware error should be 0x00 or 0x01, I guess this is a legit response?
    • 40 - available buffers, not sure how to use this... maybe it's just an indicator

    I can't try the echo suggestion because I have a second issue in that the per the spec, I am following this sequence:

    1. Reboot and watch Rdyn ~ 62ms goes low
    2. Read the odd payload from above. I think this is a DeviceStartedEvent
    3. Prepare to send setup
    4. Set Reqn line low
    5. Watch the Rdyn to go low, but it never does

    I'm at a loss here. The first thing off the buffer doesn't seem to follow spec and it's not responding to flow control.

  • I'm sure you "read" the bits in the wrong order. Debug byte should be 0x01 (0x80 reversed). Length is definitely not 20, should be the "reverse" = 0x04. 81 is the same number both ways. 40, should be reversed = 0x02, etc. Check chapter 7.1.2 SPI mode in the product specification.

Related