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

Deigning BLE sensor Network

I want to extend the ble_app_multilink_central for pca10028 Example to be able to communicate with a sensor via SPI and then initiate a connection with another pca10028. but I have a problem with the SPI driver, after testing i found out that this function bsp_configuration() stops the program from executing.

in another attempt to solve the problem i tried to make this example spi_master_with_spi_slave as my template. it is a peripheral example that doesn't require a softdevice but when i tried to program the SoftDevice first (because i will need it later for designing the NW) but then while flashing the program i get Error in Keil: Flash download Failed cortex M0 and i cant figure out the reason for that.

Parents
  • the example i am referring to is ble_app_multilink_central. i explain more what i want to achieve: a sensor connected with a DK via spi, the DK as a SPI master read the data from the sensor and then start scanning when a valid data(authentication data) is read from the sensor. then send this data to another DK. i have managed now to use the SPI with S130. int main(void) { // Initialization of various modules. app_trace_init(); LEDS_CONFIGURE(LEDS_MASK); LEDS_OFF(LEDS_MASK); buttons_init(); ble_stack_init(); client_handling_init(); device_manager_init(); scan_start();

    spiInit();
    	
    		send_data();  //send SPI frames
    
    		for (;;)
    	{
    		power_manage();
    
    	}
    

    } i am a beginner in BLE development. should it here that send_data(); send a SPI frame and then the code will enter power_manage(); and scan for BLE devices?

Reply
  • the example i am referring to is ble_app_multilink_central. i explain more what i want to achieve: a sensor connected with a DK via spi, the DK as a SPI master read the data from the sensor and then start scanning when a valid data(authentication data) is read from the sensor. then send this data to another DK. i have managed now to use the SPI with S130. int main(void) { // Initialization of various modules. app_trace_init(); LEDS_CONFIGURE(LEDS_MASK); LEDS_OFF(LEDS_MASK); buttons_init(); ble_stack_init(); client_handling_init(); device_manager_init(); scan_start();

    spiInit();
    	
    		send_data();  //send SPI frames
    
    		for (;;)
    	{
    		power_manage();
    
    	}
    

    } i am a beginner in BLE development. should it here that send_data(); send a SPI frame and then the code will enter power_manage(); and scan for BLE devices?

Children
No Data
Related