Tool/software:
My setup:
- Custom board with the CC3301 companion chip
- Probe on the SPI-ports
Goal:
- Setting up SPI communication between host MCU and CC3301 by sending CMD0
When CMD0 is sent, the probe reads the following sequence of bytes: 0x00, 0x80, 0xFE, 0xFF, 0x73, 0xF2, 0x10, 0x00 (big endian, no bit swizzle)
When reordered based on data endianness and a wordsize of 32 bits: 0xFFFE80000010F273. This data-sequence does not result in the MISO channel falling to LOW after the last bit of CMD0 has been sent -- which I understand to indicate that the CC3301 understands the settings of the SPI packages to follow. Looking at the sequence of bytes (and keeping the left bitshift from `bus_sendInitCommand(...)` in mind), the `de`-flag is set to 0 -- little endian.
If I manually set the flag high in the function by adding the following line just before the aCRCBuffer is populated:
aTempCmd0[6] = initCmd[5] |= 2;
The sequence is changed to 0x00, 0x80, 0xFE, 0xFF, 0x3B, 0xF6, 0x10, 0x00, however, the result remains the same -- no response on the MISO channel.
If, however, I manually reorder the bytes from the code, so that the sequence of bytes is: 0xFF, 0xFE, 0x80, 0x00, 0x00, 0x10, 0xF2, 0x73, IT WORKS!
However, this is not a good solution in my case, since the byte-order will be wrong everywhere else. This also indicates that the enable signal for chip is properly set up -- and there must be something wrong with how I send the CMD0, where my guess is the formatting.
This has lead me to formulate some questions:
1. Is CMD0 supposed to be sent using little endian and without bit-swizzle under any circumstance OR should it follow the formatting specified in the internal flags?
2. In the function `bus_sendInitCommand(...)` the parameter `config_params` is disregarded and a local `uint32_t config` is initialised and used instead - How am I supposed to change the `de`-flag then?
3. Is my assumption about "MISO channel falling to LOW" indicating that the CC3301 understands the settings of the SPI packages to follow?
4. Is there a command I can send to the CC3301 to see if it is able to respond?
Thanks in advance,
Albert