Merging spi and ble_app_att_mtu_throughput

Hi, 

I'm struggling to use ble_app_att_mtu_throughput and spi. Some help? 

When I merge the two codes the main code (ble_app_att_mtu_throughput) doesn't work.

Thanks for your help

  • Hi,

    Did you any clock signal on SCLK? 

    What about CS?

    regards

    Jared 

  • No but maybe I'm making some mistake. I connect the SPI Master to the SPI Driver (so I disconnected the SPI Slave), is it right?

  • However, I think the main problem is in the fact the SPI Master code isn't included in the ble_app_att_mtu_throughput project. I tried to add the spis code but is not enough. But another problem is the fact that the SPI Master is an nRF52840 board, not nRF52832 board as the SPI Slave or the ble client.

    I think it's ambitious, but I would try to include nRF52840 in the project. Is possible? The problem I'm afraid of is the fact that the SPI Master is an nRF52840 so I can't run the ble_app_att_mtu_throughput_pca_10040 as SPI Slave (which is also ble server) or ble client

  • Hi,

    Earlier you wrote that the example works when the SPI code is not included. You mentioned that you do not see any SPI activity on SCLK, CS, MOSI or MISO when including the SPI code. Have you made sure to test only the SPI code separate from the BLE code, and verified that it works?

    I think that would be a good first step, before trying to merge that in to the BLE sample,

    regards

    Jared 

  • Hi,

    Earlier you wrote that the example works when the SPI code is not included

    Yes, right. I moved the spi part from the main to the amts.c and it doesn't interfere, so the code run, but what the server receive is just 0 (instead of the data I send).

    Have you made sure to test only the SPI code separate from the BLE code, and verified that it works?

    Yes, and in this case the SPI communication between SPI Master and SPI Slave works perfectly. It seems like the SPI Slave (when become also BLE server), when I run the ble code, can't receive data via SPI.

    Regards

Related