2022-08-04 10:09 AM
While interfacing BlueNRG2 ( i am using jumper wires from STEVAL-IDB008V2) with raspberry PI 4.
which other lines do I have to use apart from MISO,MOSI ,SCK and Ground.
I am using only CS line and making it low and then high at the end of communication.
But I have seen in the X-NUCLEO-BRG2A1 code examples ( Sensor demo) , SPI IRQ is also disabled and enabled at the end?
Can you please tell is it mandatory to use the IRQ line as well for normal SPI communication between RaspPI and BlueNRG2 ?
RPI----------BlueNRG2(STEVAL-IDB008V2)
CS ------CS
MISO----MOSI
MOSI----MISO
GND-----GND
I am using the Slave DMA example on the IDB008V2.When I tried to send some dummy data I see the breakpoint hitting on the BlueNRG2 side inside the Process() method but I see no data on the MISO /MOSI lines ( from the analyzer)
*/
void processCommand(void)
{
uint8_t command;
/* Infinite loop */
while(1) {
/* Get the LEDS actual status */
spi_buffer_tx[0] = ((uint8_t)SdkEvalLedGetState(LED3))<<2 | ((uint8_t)SdkEvalLedGetState(LED2))<<1 | ((uint8_t)SdkEvalLedGetState(LED1));
/* Prepare buffer to sent through SPI DMA TX channel */
DMASpi_Sending((uint32_t)&spi_buffer_tx[0], 1);
while(buffer_spi_used==0);
/* Parse the command */
command = spi_buffer_rx[buffer_spi_tail]; <<<<<<<<<<<( Break point hitting here)
if(command == TOGGLE_DL1) {
SdkEvalLedToggle(LED1);
}
else if(command == TOGGLE_DL2) {
SdkEvalLedToggle(LED2);
}
else if(command == TOGGLE_DL3) {
SdkEvalLedToggle(LED3);
}
buffer_spi_tail = (buffer_spi_tail+1)%SPI_BUFF_SIZE;
buffer_spi_used--;
}
}
I am using BlueNRG2 in application processor mode not network processor mode .
Is there any DTM needs to be flashed first?
Regards.