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,
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,
Does the merged code build without any errors?
regards
Jared
Yes, the SPI driver should be able to work along side the BLE samples. Did you probe the SPI lines as I suggested in my last reply?
Yes, I connected the MISO/MOSI to the SPI Driver but nothing happen. I think because 0 is transmitting.
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
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
Hi,
If the SPI code works when you include it with the BLE code, then you should see the clock signal on the SCLK when it starts the transaction.
If you don't see the clock signal, then it usually means either:
Option 1 can be checked by using breakpoints and the debugger.
Option 2, can be checked by checking the PSEL.SCLK register after the module have been initialized. You can read out this register by using memrd in nRF Command Line Tools, or using the debugger in Segger and watching the register content in debug view.
I think you need to use a more time debugging your application,
regards
Jared
Hi,
I think if I'll continue to run two separate code (SPI for the SPI Master and ble_app_att_mtu_throughput+spis for BLE Server and BLE Client) it can't works
Hi,
I think I solved my problems with merging spi and my code. But now I have another big issue: the throughput. My point in this project is also maintain an high throughput (2Mbps but actually 1.4Mbps). Do you have some advice?
Thanks,
Regards.