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

Can I do pstorage store whit S120 scan start?

static void ble_evt_dispatch(ble_evt_t * p_ble_evt)
{
    uint32_t           err_code;
    const               ble_gap_evt_t   * p_gap_evt = &p_ble_evt->evt.gap_evt;
    switch (p_ble_evt->header.evt_id)
    {
        case BLE_GAP_EVT_ADV_REPORT:
        {
	      pstorage_handle_t 		flash_handle;	
	      pstorage_block_identifier_get(&flash_base_handle,pstorage_block_id, &flash_handle);
	      err_code = pstorage_store(&flash_handle, (uint8_t * )&tx_data, 32, 0);
	      pstorage_block_id++ ;
        }
Parents Reply
  • if pstorage_store returned without any errors and if you have registered your event handler for it, then it should work. Can you post the code where you register your event handler. Have you done this

    static void sys_evt_dispatch(uint32_t sys_evt)
    {
        pstorage_sys_event_handler(sys_evt);
    }
    
    // Initialize SoftDevice
    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, false);
    
    // Register with the SoftDevice handler module for System events.
    err_code = softdevice_sys_evt_handler_set(sys_evt_dispatch);
    APP_ERROR_CHECK(err_code);
    
Children
No Data
Related